withCurrentThreadAsEventLoop(_:)

    Convert the calling thread into an EventLoop.

    MultiThreadedEventLoopGroup.swift:450
    static func withCurrentThreadAsEventLoop(_ callback: @escaping (EventLoop) -> Void)

    Parameters

    callback

    Called on the EventLoop that the calling thread was converted to, providing you the EventLoop reference. Just like usually on the EventLoop, do not block in callback.

    This function will not return until the EventLoop has stopped. You can initiate stopping the EventLoop by calling eventLoop.shutdownGracefully which will eventually make this function return.

    Other members in extension

    Type members

    Show implementation details (1)

    Hide implementation details

    Instance members

    Show implementation details (1)

    Hide implementation details