mirror of
https://github.com/apple/container.git
synced 2026-09-26 01:25:52 +00:00
Continue documenting public surface (#25)
Signed-off-by: Danny Canter <danny_canter@apple.com>
This commit is contained in:
@@ -31,6 +31,7 @@ public actor AsyncLock {
|
||||
|
||||
public init() {}
|
||||
|
||||
/// withLock provides a scoped locking API to run a function while holding the lock.
|
||||
public func withLock<T: Sendable>(_ body: @Sendable @escaping (Context) async throws -> T) async rethrows -> T {
|
||||
while self.busy {
|
||||
await withCheckedContinuation { cc in
|
||||
|
||||
Reference in New Issue
Block a user