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

Example on how to schedule coro on another scheduler? #30

Open
dsvua opened this issue Jan 15, 2025 · 1 comment
Open

Example on how to schedule coro on another scheduler? #30

dsvua opened this issue Jan 15, 2025 · 1 comment

Comments

@dsvua
Copy link

dsvua commented Jan 15, 2025

I am confused on how I can schedule coro on another scheduler. For example if I want to schedule coro on unit_pool from coro on lazy_pool. Also, would coro on lazy_pool wait for coro on unit_pool? An example usage is to schedule slow disk IO reads/writes to unit_pool and not wait for them. However, I am not sure how to implement such case. Any help is appreciated.

@dsvua
Copy link
Author

dsvua commented Jan 15, 2025

Another example usage: SDL library requires all communications to created window to be done from the same thread which creates window and unit_pool fits perfectly. When all calculations and game main loop can use lazy_pool. However, I would need to schedule coros from unit_pool in lazy_pool and vise versa.

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

No branches or pull requests

1 participant