-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve processor parking strategy #27
Comments
We might want to thread::park()/unpark() the current thread and add it's handle to a processor wait list on the Scheduler... This thread would get unparked whenever Scheduler::ready() is called with a preferred_processor which is the currently parked processor, or when a Processor determines that it has a big amount (>N) of coroutines in it's deque and would like to have some help by another Processor. Well something like that I guess should solve this... |
But every time the |
Ah, I accidentally merged this branch to master by hand. My fault. We could keep on discussing in the issue. |
Right now
Processor
s will wait forever in its own channel until got notified byProcMessage
. So it won't try to steal jobs from the otherProcessor
s!So we have to add something to achieve:
Processor
won't spin itself when it has nothing to do.Processor
can process theProcMessage
s in time.Processor
can steal jobs from the otherProcessor
s.Please add comments below :)
The text was updated successfully, but these errors were encountered: