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

crossbeam-deque has no blocking pop: how do you use it? #984

Open
tomshackell opened this issue Jun 8, 2023 · 0 comments
Open

crossbeam-deque has no blocking pop: how do you use it? #984

tomshackell opened this issue Jun 8, 2023 · 0 comments

Comments

@tomshackell
Copy link

tomshackell commented Jun 8, 2023

I notice that crossbeam-deque doesn't appear to include a blocking pop. The find_task example returns an Option<T>. Is the intention that if you have a pool of threads they should all just spin-lock continuously polling for work, even when not in use? That seems extremely inefficient and it's really not clear how this is supposed to work practically. Maybe an example showing how you actually build a real multi-threaded task-scheduler using crossbeam-deque would help?

EDIT: Ah okay I see, this is just a very small piece of writing a practical work queue. All the hard stuff of getting the notifications right you have to do all that yourself.

@tomshackell tomshackell changed the title crossbeam-dequeue has no blocking pop: how do you use it? crossbeam-deque has no blocking pop: how do you use it? Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant