Expand description
Per-core task queues: LocalQueue (ring buffer) + GlobalQueue (mutex deque).
ยงDesign
LocalQueueโ fixed-capacity 256-slot ring buffer for LIFO local dequeuing. Overflow tasks (when ring is full) are spilled to theGlobalQueue.GlobalQueueโMutex<VecDeque<Arc<TaskHeader>>>for cross-thread injection and work-stealing. Also storesTaskhandles for executor ownership.
Both queues operate on Arc<TaskHeader> for the waker path, and Task for
the executor-ownership path. The distinction matters for drop semantics:
- Wakers push
Arc<TaskHeader>(no Future ownership). - Executor pops
Arc<TaskHeader>and looks up its ownedTaskby pointer.
For simplicity in the single-threaded executor, both queues store
Arc<TaskHeader> and the executor maintains a separate slab of Task owners.