Instance Methodswift-nio 2.72.0NIOPosix
shutdownGracefully(queue:_:)
Shut this MultiThreadedEventLoopGroup
down which causes the EventLoop
s and their associated threads to be shut down and release their resources.
@preconcurrency func shutdownGracefully(queue: DispatchQueue, _ handler: @escaping (Error?) -> Void)
Parameters
Even though calling shutdownGracefully
more than once should be avoided, it is safe to do so and execution of the handler
is guaranteed.
Other members in extension
Type members
init(numberOfThreads: Int
) Creates a
MultiThreadedEventLoopGroup
instance which usesnumberOfThreads
.init(numberOfThreads: Int, metricsDelegate: NIOEventLoopMetricsDelegate
) Creates a
MultiThreadedEventLoopGroup
instance which usesnumberOfThreads
.static var currentEventLoop: EventLoop?
Returns the
EventLoop
for the calling thread.static var singleton: MultiThreadedEventLoopGroup
A globally shared, singleton
MultiThreadedEventLoopGroup
.static func withCurrentThreadAsEventLoop(@escaping (EventLoop) -> Void
) Convert the calling thread into an
EventLoop
.
Show implementation details (1)
Hide implementation details
static func _makePerpetualGroup(threadNamePrefix: String, numberOfThreads: Int
) -> MultiThreadedEventLoopGroup Create a
MultiThreadedEventLoopGroup
that cannot be shut down and must not bedeinit
ed.
Instance members
var description: String
func any(
) -> EventLoop Returns the current
EventLoop
if we are on anEventLoop
of thisMultiThreadedEventLoopGroup
instance.func makeIterator(
) -> EventLoopIterator Returns an
EventLoopIterator
over theEventLoop
s in thisMultiThreadedEventLoopGroup
.func next(
) -> EventLoop Returns the next
EventLoop
from thisMultiThreadedEventLoopGroup
.