Submits a closure asynchronously to the given `Queue` and associates it with self.
(&self, queue: &Queue, work: F)
| 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. |