Required Instance Methodswift-nio 2.72.0NIOCore
_preconditionSafeToSyncShutdown(file:line:)
Must crash if it’s not safe to call syncShutdownGracefully
in the current context.
func _preconditionSafeToSyncShutdown(file: StaticString, line: UInt)
This method is a debug hook that can be used to override the behaviour of syncShutdownGracefully
when called. By default it does nothing.
Other requirements
Instance members
func any(
) -> EventLoop Returns any
EventLoop
from theEventLoopGroup
, a common choice is the currentEventLoop
.func makeIterator(
) -> EventLoopIterator Returns an
EventLoopIterator
over theEventLoop
s in thisEventLoopGroup
.func next(
) -> EventLoop Returns the next
EventLoop
to use, this is useful for load balancing.func shutdownGracefully(queue: DispatchQueue, @escaping (Error?) -> Void
) Shuts down the eventloop gracefully. This function is clearly an outlier in that it uses a completion callback instead of an EventLoopFuture. The reason for that is that NIO’s EventLoopFutures will call back on an event loop. The virtue of this function is to shut the event loop down. To work around that we call back on a DispatchQueue instead.