32 #ifndef VSMC_GCD_DISPATCH_GROUP_HPP
33 #define VSMC_GCD_DISPATCH_GROUP_HPP
38 #include <dispatch/dispatch.h>
51 void enter ()
const {::dispatch_group_enter(this->
object());}
53 void leave ()
const {::dispatch_group_leave(this->
object());}
55 long wait (::dispatch_time_t timeout)
const
56 {return ::dispatch_group_wait(this->
object(), timeout);}
58 template <DispatchQueueType Type>
60 ::dispatch_function_t work)
const
61 {::dispatch_group_async_f(this->
object(), queue.object(), context, work);}
64 ::dispatch_function_t work)
const
65 {::dispatch_group_async_f(this->
object(), queue, context, work);}
67 template <DispatchQueueType Type>
69 ::dispatch_function_t work)
const
70 {::dispatch_group_notify_f(this->
object(), queue.object(), context, work);}
73 ::dispatch_function_t work)
const
74 {::dispatch_group_notify_f(this->
object(), queue, context, work);}
77 template <DispatchQueueType Type>
79 ::dispatch_block_t block)
const
80 {::dispatch_group_async(this->
object(), queue.object(), block);}
83 ::dispatch_block_t block)
const
84 {::dispatch_group_async(this->
object(), queue, block);}
86 template <DispatchQueueType Type>
88 ::dispatch_block_t block)
const
89 {::dispatch_group_notify(this->
object(), queue.object(), block);}
92 ::dispatch_block_t block)
const
93 {::dispatch_group_notify(this->
object(), queue, block);}
99 #endif // VSMC_GCD_DISPATCH_GROUP_HPP
void notify(::dispatch_queue_t queue,::dispatch_block_t block) const
void async_f(::dispatch_queue_t queue, void *context,::dispatch_function_t work) const
Base class of Dispatch objects.
void async(const DispatchQueue< Type > &queue,::dispatch_block_t block) const
void notify_f(const DispatchQueue< Type > &queue, void *context,::dispatch_function_t work) const
void async_f(const DispatchQueue< Type > &queue, void *context,::dispatch_function_t work) const
void async(::dispatch_queue_t queue,::dispatch_block_t block) const
void notify_f(::dispatch_queue_t queue, void *context,::dispatch_function_t work) const
long wait(::dispatch_time_t timeout) const
void notify(const DispatchQueue< Type > &queue,::dispatch_block_t block) const