Function enqueue_decoupled

Source
pub fn enqueue_decoupled(f: impl FnOnce() + Send + 'static)
Expand description

Enqueue work on the runtime without caring about the return value. This is useful in situations where work must be performed but the result does not matter. For example, when destorying CUDA object as part of dropping an object.

§Arguments

  • f - Function closure to execute on runtime.

§Example

enqueue_decoupled(move || {
    // ...
});