MCPcopy Create free account
hub / github.com/SSheldon/rust-dispatch / exec_async

Method exec_async

src/group.rs:34–40  ·  view source on GitHub ↗

Submits a closure asynchronously to the given `Queue` and associates it with self.

(&self, queue: &Queue, work: F)

Source from the content-addressed store, hash-verified

32 /// Submits a closure asynchronously to the given `Queue` and associates it
33 /// with self.
34 pub fn exec_async<F>(&self, queue: &Queue, work: F)
35 where F: 'static + Send + FnOnce() {
36 let (context, work) = context_and_function(work);
37 unsafe {
38 dispatch_group_async_f(self.ptr, queue.ptr, context, work);
39 }
40 }
41
42 /// Schedules a closure to be submitted to the given `Queue` when all tasks
43 /// associated with self have completed.

Callers 3

async_incrementFunction · 0.45
test_groupFunction · 0.45
promptFunction · 0.45

Calls 1

context_and_functionFunction · 0.85

Tested by 1

test_groupFunction · 0.36