cancelScheduledCallback(_:)
Default implementation of cancelScheduledCallback(_:): only cancels callbacks scheduled by the default implementation of scheduleCallback.
func cancelScheduledCallback(_ scheduledCallback: NIOScheduledCallback) Default implementation of cancelScheduledCallback(_:): only cancels callbacks scheduled by the default implementation of scheduleCallback.
func cancelScheduledCallback(_ scheduledCallback: NIOScheduledCallback) s7NIOCore9EventLoopPAAE23cancelScheduledCallbackyyAA012NIOScheduledF0VF What are these?9BXWZimport NIOCoreThe core abstractions that make up SwiftNIO.
protocol EventLoop : EventLoopGroupAn EventLoop processes IO / tasks in an endless loop for Channels until it’s closed.
struct NIOScheduledCallbackAn opaque handle that can be used to cancel a scheduled callback.
func cancelScheduledCallback(_ scheduledCallback: NIOScheduledCallback) Cancel a scheduled callback.
var executor: any SerialExecutor { get }var now: NIODeadline { get }Default implementation of now: Returns NIODeadline.now().
func _executeIsolatedUnsafeUnchecked(_ task: @escaping () -> Void) Default implementation: wraps the task in an UnsafeTransfer.
func _preconditionSafeToWait(file: StaticString, line: UInt) func _promiseCompleted(futureIdentifier: _NIOEventLoopFutureIdentifier) -> (file: StaticString, line: UInt)? Default implementation of _promiseCompleted: does nothing.
func _promiseCreated(futureIdentifier: _NIOEventLoopFutureIdentifier, file: StaticString, line: UInt) Default implementation of _promiseCreated: does nothing.
@preconcurrency func _scheduleCallback(at deadline: NIODeadline, handler: some NIOScheduledCallbackHandler & Sendable) -> NIOScheduledCallback @discardableResult func _scheduleCallbackIsolatedUnsafeUnchecked(at deadline: NIODeadline, handler: some NIOScheduledCallbackHandler) throws -> NIOScheduledCallback @discardableResult func _scheduleCallbackIsolatedUnsafeUnchecked(in amount: TimeAmount, handler: some NIOScheduledCallbackHandler) throws -> NIOScheduledCallback @discardableResult func _scheduleTaskIsolatedUnsafeUnchecked<T>(deadline: NIODeadline, _ task: @escaping () throws -> T) -> Scheduled<T> Default implementation: wraps the task in an UnsafeTransfer.
@discardableResult func _scheduleTaskIsolatedUnsafeUnchecked<T>(in delay: TimeAmount, _ task: @escaping () throws -> T) -> Scheduled<T> Default implementation: wraps the task in an UnsafeTransfer.
func _submitIsolatedUnsafeUnchecked<T>(_ task: @escaping () throws -> T) -> EventLoopFuture<T> Default implementation: wraps the task in an UnsafeTransfer.
func any() -> any EventLoop An EventLoop forms a singular EventLoopGroup, returning itself as ‘any’ EventLoop.
func assertInEventLoop(file: StaticString = #fileID, line: UInt = #line) Asserts that the current thread is the one tied to this EventLoop. Otherwise, if running in debug mode, the process will be abnormally terminated as per the semantics of preconditionFailure(_:file:line:). Never has any effect in release mode.
func assertNotInEventLoop(file: StaticString = #fileID, line: UInt = #line) Asserts that the current thread is not the one tied to this EventLoop. Otherwise, if running in debug mode, the process will be abnormally terminated as per the semantics of preconditionFailure(_:file:line:). Never has any effect in release mode.
func assumeIsolated() -> NIOIsolatedEventLoop Assumes the calling context is isolated to the event loop.
func assumeIsolatedUnsafeUnchecked() -> NIOIsolatedEventLoop Assumes the calling context is isolated to the event loop.
func close() throws Close this EventLoop.
func enqueue(_ job: consuming ExecutorJob) @discardableResult @preconcurrency func flatScheduleTask<T>(deadline: NIODeadline, file: StaticString = #fileID, line: UInt = #line, _ task: @escaping () throws -> EventLoopFuture<T>) -> Scheduled<T> where T : Sendable Schedule a task that is executed by this EventLoop at the given time.
@discardableResult @preconcurrency func flatScheduleTask<T>(in delay: TimeAmount, file: StaticString = #fileID, line: UInt = #line, _ task: @escaping () throws -> EventLoopFuture<T>) -> Scheduled<T> where T : Sendable Schedule a task that is executed by this EventLoop after the given amount of time.
@preconcurrency func flatSubmit<T>(_ task: @escaping () -> EventLoopFuture<T>) -> EventLoopFuture<T> where T : Sendable Submit task to be run on this EventLoop.
@preconcurrency func makeCompletedFuture<Success>(_ result: Result<Success, any Error>) -> EventLoopFuture<Success> where Success : Sendable Creates and returns a new EventLoopFuture that is marked as succeeded or failed with the value held by result.
@preconcurrency func makeCompletedFuture<Success>(withResultOf body: () throws -> Success) -> EventLoopFuture<Success> where Success : Sendable Creates and returns a new EventLoopFuture that is marked as succeeded or failed with the value returned by body.
func makeFailedFuture<T>(_ error: any Error) -> EventLoopFuture<T> Creates and returns a new EventLoopFuture that is already marked as failed. Notifications will be done using this EventLoop as execution NIOThread.
@preconcurrency func makeFutureWithTask<Return>(_ body: @escaping () async throws -> Return) -> EventLoopFuture<Return> where Return : Sendable func makeIterator() -> EventLoopIterator Returns an EventLoopIterator over this EventLoop.
func makePromise<T>(of type: T.Type = T.self, file: StaticString = #fileID, line: UInt = #line) -> EventLoopPromise<T> Creates and returns a new EventLoopPromise that will be notified using this EventLoop as execution NIOThread.
@preconcurrency func makeSucceededFuture<Success>(_ value: Success) -> EventLoopFuture<Success> where Success : Sendable Creates and returns a new EventLoopFuture that is already marked as success. Notifications will be done using this EventLoop as execution NIOThread.
func makeSucceededIsolatedFuture<Success>(_ value: Success) -> EventLoopFuture<Success>.Isolated Creates and returns a new isolated EventLoopFuture that is already marked as success. Notifications will be done using this `EventLoop.
func makeSucceededVoidFuture() -> EventLoopFuture<Void> Default implementation of makeSucceededVoidFuture: Return a fresh future (which will allocate).
func next() -> any EventLoop An EventLoop forms a singular EventLoopGroup, returning itself as the ‘next’ EventLoop.
func preconditionInEventLoop(file: StaticString = #fileID, line: UInt = #line) Checks the necessary condition of currently running on the called EventLoop for making forward progress.
func preconditionNotInEventLoop(file: StaticString = #fileID, line: UInt = #line) Checks the necessary condition of currently not running on the called EventLoop for making forward progress.
@discardableResult @preconcurrency func scheduleCallback(at deadline: NIODeadline, handler: some NIOScheduledCallbackHandler & Sendable) -> NIOScheduledCallback Default implementation of scheduleCallback(at deadline:handler:): backed by EventLoop.scheduleTask.
@discardableResult @preconcurrency func scheduleCallback(in amount: TimeAmount, handler: some NIOScheduledCallbackHandler & Sendable) throws -> NIOScheduledCallback Default implementation of scheduleCallback(in amount:handler:): calls scheduleCallback(at deadline:handler:).
@discardableResult func scheduleRepeatedAsyncTask(initialDelay: TimeAmount, delay: TimeAmount, maximumAllowableJitter: TimeAmount, notifying promise: EventLoopPromise<Void>? = nil, _ task: @escaping (RepeatedTask) -> EventLoopFuture<Void>) -> RepeatedTask Schedule a repeated asynchronous task to be executed by the EventLoop with a fixed delay between the end and start of each task.
@discardableResult @preconcurrency func scheduleRepeatedAsyncTask(initialDelay: TimeAmount, delay: TimeAmount, notifying promise: EventLoopPromise<Void>? = nil, _ task: @escaping (RepeatedTask) -> EventLoopFuture<Void>) -> RepeatedTask Schedule a repeated asynchronous task to be executed by the EventLoop with a fixed delay between the end and start of each task.
@discardableResult func scheduleRepeatedTask(initialDelay: TimeAmount, delay: TimeAmount, maximumAllowableJitter: TimeAmount, notifying promise: EventLoopPromise<Void>? = nil, _ task: @escaping (RepeatedTask) throws -> Void) -> RepeatedTask Schedule a repeated task to be executed by the EventLoop with a fixed delay between the end and start of each task.
@discardableResult @preconcurrency func scheduleRepeatedTask(initialDelay: TimeAmount, delay: TimeAmount, notifying promise: EventLoopPromise<Void>? = nil, _ task: @escaping (RepeatedTask) throws -> Void) -> RepeatedTask Schedule a repeated task to be executed by the EventLoop with a fixed delay between the end and start of each task.
@preconcurrency func submit<T>(_ task: @escaping () throws -> T) -> EventLoopFuture<T> Submit task to be run on this EventLoop.
func makeFailedFuture<T>(_ error: any Error, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<T> @preconcurrency func makeSucceededFuture<Success>(_ value: Success, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<Success> where Success : Sendable