Skip to content

TaskCreateFlags

tevelee edited this page Jul 25, 2026 · 1 revision

TaskCreateFlags

Flags supplied when the runtime creates an asynchronous task.

public struct TaskCreateFlags: Equatable, Sendable 

These flags describe task creation, not an already-running task. Decode them only from storage whose lifetime and synchronization you control.

Inheritance

Equatable, Sendable

Initializers

init(bits:)

Creates flags from their Swift runtime representation.

public init(bits: UInt) 

Properties

bits

Raw runtime flag bits.

public let bits: UInt

requestedPriority

The requested priority, or nil for a runtime value Echo does not know.

public var requestedPriority: JobPriority? 

isChildTask

Whether the created task is a child of the current task.

public var isChildTask: Bool 

isInlineTask

Whether this task is intended to run inline.

public var isInlineTask: Bool 

copiesTaskLocals

Whether task-local values are copied into the new task.

public var copiesTaskLocals: Bool 

inheritsContext

Whether the task inherits its execution context.

public var inheritsContext: Bool 

enqueuesJob

Whether the new task should be enqueued immediately.

public var enqueuesJob: Bool 

addsPendingGroupTaskUnconditionally

Whether a group task is added even if it has already become cancelled.

public var addsPendingGroupTaskUnconditionally: Bool 

isDiscardingTask

Whether the task discards its result.

public var isDiscardingTask: Bool 

isTaskFunctionConsumed

Whether the task function uses consuming (@callee_owned) ownership.

public var isTaskFunctionConsumed: Bool 

This flag was introduced in Swift 6.1.

isImmediateTask

Whether the task is an immediate task.

public var isImmediateTask: Bool 
Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally