-
Notifications
You must be signed in to change notification settings - Fork 84
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
way to control the scheduler #28
Comments
this is possible with the following configuration may::config().set_workers(1).set_io_workers(0);
no, currently |
Wouldn't:
set parallelism to 1 across all coroutines? What I want to do is to have a function:
and all coroutines that run through it have constrained parallelism. |
can |
It will do the work but it seems to me that it does more work than necessary. The scheduler already does the synchronization (fences/etc) necessary when a coroutine switches from one thread to another. If for example it happens that most of the time Mutex seems much heavier than that. Perhaps I am missing something? |
The sync primitives used in coroutine context doesn't involve system calls, and they are just running in user space which is fast. |
This can allow some usecases:
Perhaps this is already possible?
The text was updated successfully, but these errors were encountered: