dispatch

package
v0.5.0-preview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 4 Imported by: 5

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 Data

type Data unsafe.Pointer

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.

func (Queue) Release

func (q Queue) Release()

func (Queue) Retain

func (q Queue) Retain()

type QueuePriority

type QueuePriority int
const (
	QueuePriorityDefault    QueuePriority = 0
	QueuePriorityHigh       QueuePriority = 2
	QueuePriorityLow        QueuePriority = -2
	QueuePriorityBackground QueuePriority = math.MinInt16
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL