Protocolswift 5.10.0_Concurrency
SerialExecutor
A service that executes jobs.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
protocol SerialExecutor : Executor
Supertypes
protocol Executor
A service that can execute jobs.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Requirements
Instance members
func asUnownedSerialExecutor(
) -> UnownedSerialExecutor Convert this executor value to the optimized form of borrowed executor references.
func enqueue(consuming ExecutorJob
) func isSameExclusiveExecutionContext(other: Self
) -> Bool If this executor has complex equality semantics, and the runtime needs to compare two executors, it will first attempt the usual pointer-based equality check, and if it fails it will compare the types of both executors, if they are the same, it will finally invoke this method, in an attempt to let the executor itself decide if this and the
other
executor represent the same serial, exclusive, isolation context.
Show obsolete interfaces (2)
Hide obsolete interfaces
Citizens in _Concurrency
Instance members
func asUnownedSerialExecutor(
) -> UnownedSerialExecutor func assertIsolated(@autoclosure () -> String, file: StaticString, line: UInt
) Performs an executor check in debug builds.
func isSameExclusiveExecutionContext(other: Self
) -> Bool func preconditionIsolated(@autoclosure () -> String, file: StaticString, line: UInt
) Unconditionally if the current task is executing on the expected serial executor, and if not crash the program offering information about the executor mismatch.
Extension in NIOCore
Subtypes
protocol NIOSerialEventLoopExecutor
A helper protocol that can be mixed in to a NIO
EventLoop
to provide an automatic conformance toSerialExecutor
.