This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A queue that executes async functions in order, and atomically. | |
/// That is, each enqueued func executes fully before the next one is started. | |
struct AsyncSerialQueue { | |
typealias Block = () async throws -> [Int] | |
private struct Item { | |
let block: Block | |
let continuation: CheckedContinuation<[Int], Error> | |
} |
OlderNewer