async-executor icon indicating copy to clipboard operation
async-executor copied to clipboard

Fix deadlock when only calling `Executor::tick` to drive it

Open james7132 opened this issue 1 year ago • 2 comments

Pre-1.9.0, you could spawn tasks on one thread, and then manually tick on another without issue since all tasks were queued into the global injector queue. Now that spawn prioritizes local queues over the global injector queue, this no longer works properly. To fix this, this PR changes Ticker::runnable to steal one task from the other thread-local queues.

Ticker::drop was also not taking and dropping the Waker from the thread local queue.

james7132 avatar Feb 22 '24 08:02 james7132

As in those tests pass even in the base #93 without this fix? Or that this PR doesn't fix those tests?

james7132 avatar Feb 25 '24 00:02 james7132

Yes, these tests pass on master when #93 is removed via rebase.

notgull avatar Feb 25 '24 00:02 notgull