You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that crossbeam-deque doesn't appear to include a blocking pop. The find_taskexample 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.
The text was updated successfully, but these errors were encountered:
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
I notice that crossbeam-deque doesn't appear to include a blocking pop. The
find_task
example returns anOption<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 usingcrossbeam-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.
The text was updated successfully, but these errors were encountered: