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

Function dependencies with Rayon without blocking the thread / Rayon synchronization primitives? #1171

Open
codecnotsupported opened this issue May 29, 2024 · 0 comments

Comments

@codecnotsupported
Copy link

codecnotsupported commented May 29, 2024

I've a few OPs that need to be executed in Rayon, but they've dependencies.
There are multiple ways to handle dependencies but decided to put synchronization inside the function.
However using anything blocking (such as a Barrier) with Rayon would prevent work stealing.

I made a quick example to illustrate my solution to my problem.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=00cb5cf546ec9a3d564d5869fb6c1cd4

I was wondering if Rayon could add some synchronization primitives (like in the example), and if there is anything wrong with the example provided.

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