Skip to main content

queue_user_apc_to_current_thread

Function queue_user_apc_to_current_thread 

Source
pub fn queue_user_apc_to_current_thread(
    routine: impl FnOnce() + Send + 'static,
) -> Result<()>
Expand description

queue_user_apc to the calling thread.

The routine runs in the next alertable wait the thread makes, which is what makes the wait’s Alerted ending reachable without a second thread.

§Errors

The error from QueueUserAPC, which for the calling thread arises only when the kernel cannot allocate the APC; no test reaches it.