Library Moduleswift-async-queue 0.6.0AsyncQueue
AsyncQueue
import AsyncQueue
Module information
- Declarations
- 19
- Symbols
- 19
Uncategorized
Types
class ActorQueue<ActorType>
A queue that enables enqueing ordered asynchronous tasks from a nonisolated context onto an adopted actor’s isolated context. Tasks are guaranteed to begin executing in the order in which they are enqueued. However, if a task suspends it will allow subsequently enqueued tasks to begin executing. This queue exhibits the execution behavior of an actor: tasks sent to this queue can re-enter the queue, and tasks may execute in non-FIFO order when a task suspends.
class FIFOQueue
A queue that executes asynchronous tasks enqueued from a nonisolated context in FIFO order. Tasks are guaranteed to begin and end executing in the order in which they are enqueued. Asynchronous tasks sent to this queue work as they would in a
DispatchQueue
type. Attempting toenqueueAndWait
this queue from a task executing on this queue will result in a deadlock.class MainActorQueue
A queue that enables enqueing ordered asynchronous tasks from a nonisolated context onto the
@MainActor
’s isolated context. Tasks are guaranteed to begin executing in the order in which they are enqueued. However, if a task suspends it will allow subsequently enqueued tasks to begin executing. This queue exhibits the execution behavior of an actor: tasks sent to this queue can re-enter the queue, and tasks may execute in non-FIFO order when a task suspends.