This file contains 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 simple serial queue. Every operation sent through the queue will be executed | |
// in first-in first-out order. Every operation will complete its execution fully, | |
// even if it includes suspension points, prior to the next operation commencing. | |
// | |
// TIP: If calling from a global actor like @MainActor annotate your closure to | |
// get better ergonomics: `queue.send { @MainActor in /* ... */ }` | |
public final class AsyncSerialQueue: Sendable { | |