Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support async #6

Open
fredemmott opened this issue Jan 3, 2024 · 1 comment
Open

Support async #6

fredemmott opened this issue Jan 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@fredemmott
Copy link
Owner

  • add a co_await runner to profiles
  • support async lambdas and mappers

This is to allow:

  • running other stuff in the main profile run loop, e.g. a webserver
  • a nicer API for running stuff with a delay - co_await winrt::resume_after(std::chrono::milliseconds(100));
@fredemmott fredemmott added the enhancement New feature or request label Jan 3, 2024
@fredemmott
Copy link
Owner Author

  • most things (including DirectInput) can boil down to a waitable HANDLE, then WaitForMultipleObjects()
  • timers can either be implemented via CreateWaitableTimer() + SetWaitableTimer(), or by keeping track of them and using the timeout for WaitForMultipleObjects()
  • if windows are created (eg for a system tray icon), the event loop must run in the thread that owns the window, and use MsgWaitForMultipleObjects()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant