func shutdown()

in Sources/StatsdClient/StatsdClient.swift [285:295]


    func shutdown(_ callback: @escaping (Error?) -> Void) {
        switch self.eventLoopGroupProvider {
        case .createNew:
            if self.isShutdown.compareAndExchange(expected: false, desired: true) {
                self.eventLoopGroup.shutdownGracefully(callback)
            }
        case .shared:
            self.isShutdown.store(true)
            callback(nil)
        }
    }