Skip to main content

TASK_LOCAL_EXECUTOR

Constant TASK_LOCAL_EXECUTOR 

Source
pub const TASK_LOCAL_EXECUTOR: LocalKey<RefCell<Option<Box<dyn SomeLocalExecutor<'static, ExecutorNotifier = Box<dyn ExecutorNotified>>>>>>;
Expand description

Thread-local storage for the current thread’s local executor.

This allows tasks to access a local executor that can handle !Send futures on the current thread. Unlike task-local executors, this is scoped to the OS thread rather than the async task.