MCPcopy Index your code
hub / github.com/SSheldon/rust-dispatch / exec_async

Method exec_async

src/queue.rs:157–162  ·  view source on GitHub ↗

Submits a closure for asynchronous execution on self and returns immediately.

(&self, work: F)

Source from the content-addressed store, hash-verified

155 /// Submits a closure for asynchronous execution on self and returns
156 /// immediately.
157 pub fn exec_async<F>(&self, work: F) where F: 'static + Send + FnOnce() {
158 let (context, work) = context_and_function(work);
159 unsafe {
160 dispatch_async_f(self.ptr, context, work);
161 }
162 }
163
164 /// After the specified delay, submits a closure for asynchronous execution
165 /// on self.

Callers 1

async_incrementFunction · 0.45

Calls 1

context_and_functionFunction · 0.85

Tested by

no test coverage detected