Investigate ways to make `steal` from `async-executor` more efficient
Opened this issue · 2 comments
It appears that a large amount of time in async-executor
is spent shuffling around tasks between different queues. It would be interesting if there are ways to make such stealing of half of a queue faster, perhaps by making such a function part of this crate and utilize knowledge about internals to make such "mass-moves" faster.
concurrent-queue
is ill-suited for this purpose. My plan was to use a dedicated work-stealing queue like crossbeam-deque
.
I just attempted this and crossbeam-deque requires an additional function on their Worker or Stealer that supports checking if they're pointing to the same underlying queue (like Arc::ptr_eq) or we risk having a worker steal from itself or failing to remove stealers when dropping a Runner.