Edytuj

Udostępnij za pośrednictwem


DispatchQueue Constructors

Definition

Overloads

DispatchQueue(IntPtr)

Surfaces an unmanaged DispatchQueue as a managed object.

DispatchQueue(String)

Creates a named dispatch queue that serializes all submitted blocks.

DispatchQueue(String, Boolean)

Creates a named dispatch queue that can optionally execute any submitted code concurrently.

DispatchQueue(String, DispatchQueue+Attributes, DispatchQueue)

DispatchQueue(IntPtr)

Surfaces an unmanaged DispatchQueue as a managed object.

public DispatchQueue (IntPtr handle);
new CoreFoundation.DispatchQueue : nativeint -> CoreFoundation.DispatchQueue

Parameters

handle
IntPtr

nativeint

Handle to an unmanaged dispatch queue.

Applies to

DispatchQueue(String)

Creates a named dispatch queue that serializes all submitted blocks.

public DispatchQueue (string label);
new CoreFoundation.DispatchQueue : string -> CoreFoundation.DispatchQueue

Parameters

label
String

Name for the dispatch queue, as a convention, use reverse-style DNS names for your queue name.

Remarks

Creates a dispatching queue that executes code blocks serially.

If you want to create a dispatch queue that can execute the submitted code concurrently, use the constructor that takes a boolean "concurrent" argument.

Applies to

DispatchQueue(String, Boolean)

Creates a named dispatch queue that can optionally execute any submitted code concurrently.

public DispatchQueue (string label, bool concurrent);
new CoreFoundation.DispatchQueue : string * bool -> CoreFoundation.DispatchQueue

Parameters

label
String

Name for the dispatch queue, as a convention, use reverse-style DNS names for your queue name.

concurrent
Boolean

If set, the dispatch queue can invoke the submitted blocks concurrently.

Remarks

If the concurrent is set to false this is equivalent to calling the constructor tht takes a single string argument. That is, it will execute all submitted code blocks serially, one after another.

If the value is true then the queue can execute the code blocks concurrently. In this mode, you can use the DispatchBarrierAsync(Action) method to submit a code block that will wait for all pending concurrent blocks to complete execution, then it will execute the code block to completion. During the time that the barrier executes, any other code blocks submitted are queued, and will be scheduled to run (possibly concurrently) after the barrier method completes.

Applies to

DispatchQueue(String, DispatchQueue+Attributes, DispatchQueue)

[ObjCRuntime.TV(10, 0)]
[ObjCRuntime.Watch(3, 0)]
public DispatchQueue (string label, CoreFoundation.DispatchQueue.Attributes attributes, CoreFoundation.DispatchQueue target = null);
new CoreFoundation.DispatchQueue : string * CoreFoundation.DispatchQueue.Attributes * CoreFoundation.DispatchQueue -> CoreFoundation.DispatchQueue

Parameters

label
String
target
DispatchQueue
Attributes

Applies to