func withSemaphore()

in Sources/Confidence/EventSenderEngine.swift [125:134]


    func withSemaphore(callback: @escaping () async -> Void) async {
        await withCheckedContinuation { continuation in
            DispatchQueue.global().async {
                self.semaphore.wait()
                continuation.resume()
            }
        }
        await callback()
        semaphore.signal()
    }