Skip to main content

decline_on_this_thread

Function decline_on_this_thread 

pub fn decline_on_this_thread(wake: Arc<dyn Fn() + Send + Sync>)
Expand description

From now on, have stores do this thread’s disk work (opening, reading) elsewhere and answer “not yet”, waking it through wake once the work is done: for a frame loop, before its loop forbids every wait (forbid_on_this_thread). Its own waits, such as a flush it asks for, stay allowed. For the rest of the thread’s life, or until a guard made before this drops; a forbidden thread keeps its rule and takes the new wake.