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

Method notify

src/group.rs:45–51  ·  view source on GitHub ↗

Schedules a closure to be submitted to the given `Queue` when all tasks associated with self have completed. If self is empty, the closure is submitted immediately.

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

Source from the content-addressed store, hash-verified

43 /// associated with self have completed.
44 /// If self is empty, the closure is submitted immediately.
45 pub fn notify<F>(&self, queue: &Queue, work: F)
46 where F: 'static + Send + FnOnce() {
47 let (context, work) = context_and_function(work);
48 unsafe {
49 dispatch_group_notify_f(self.ptr, queue.ptr, context, work);
50 }
51 }
52
53 /// Waits synchronously for all tasks associated with self to complete.
54 pub fn wait(&self) {

Callers 1

test_groupFunction · 0.80

Calls 1

context_and_functionFunction · 0.85

Tested by 1

test_groupFunction · 0.64