Documentation ¶
Overview ¶
Execute code concurrently on multicore hardware by submitting work to dispatch queues managed by the system.
[Apple Documentation]
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is for dispatch_queue_t
func GlobalQueue ¶
func GlobalQueue(identifier QueuePriority, flags uintptr) Queue
Returns a system-defined global concurrent queue with the specified quality-of-service class. Full Topic
func MainQueue ¶
func MainQueue() Queue
Returns the serial dispatch queue associated with the application’s main thread. Full Topic
func (Queue) DispatchAsync ¶
func (q Queue) DispatchAsync(task func())
Submits a block for asynchronous execution on a dispatch queue and returns immediately.
func (Queue) DispatchSync ¶
func (q Queue) DispatchSync(task func())
Submits a block object for execution and returns after that block finishes executing.
type QueuePriority ¶
type QueuePriority int
const ( QueuePriorityDefault QueuePriority = 0 QueuePriorityHigh QueuePriority = 2 QueuePriorityLow QueuePriority = -2 QueuePriorityBackground QueuePriority = math.MinInt16 )
Click to show internal directories.
Click to hide internal directories.