Add note about post-run spawns.

This commit is contained in:
james7132 2024-02-21 15:42:35 -08:00
parent aadac47308
commit c8443e02a4
No known key found for this signature in database
GPG Key ID: BDB0606BDC85825B
1 changed files with 5 additions and 0 deletions

View File

@ -530,6 +530,11 @@ struct State {
/// If possible, tasks are scheduled onto the local queue, and will only defer
/// to othe global queue when they're full, or the task is being scheduled from
/// a thread without a runner.
///
/// Note: if a runner terminates and drains its local queue, any subsequent
/// spawn calls from the same thread will be added to the same queue, but won't
/// be executed until `Executor::run` is run on the thread again, or another
/// thread steals the task.
local_queue: ThreadLocal<LocalQueue>,
/// Set to `true` when a sleeping ticker is notified or no tickers are sleeping.