-
Notifications
You must be signed in to change notification settings - Fork 501
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
Thread pool without work stealing #1174
Comments
It may be worth noting that our driver thread pool executes exactly as many jobs as there are threads in the pool. |
The general issue with One of the ideas in that thread is to have a fully-blocking version of |
Yes, that would solve my problem. Is there any on-going work in that direction? Or tips for how to implement such a feature? |
It looks like the meat of the work would be in and around this function. rayon/rayon-core/src/registry.rs Line 533 in 3e3962c
|
Or rather, avoid that function in this case and call |
I implemented the suggestion in #1175. I did not call |
We are using a rayon thread pool to run a rust-based userspace driver. A mutex must be acquired before calls can be made to the driver.
We are running into a common deadlock problem with rayon work-stealing.
This issue occurs because the third party code that invokes our driver is also using rayon.
The deadlock results from the following events:
The rayon thread pool API fits our use-case perfectly, but the implementation detail of work-stealing causes deadlocks.
Is there an easy way to modify the thread pool internals to prevent work-stealing?
I'm not looking to merge with upstream unless this feature is wanted by others. I'd be OK with maintaining a non-work-stealing fork if a maintainer could give me some tips for how to do this.
The text was updated successfully, but these errors were encountered: