Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Containerization/LinuxContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ extension LinuxContainer {
agent: agent,
vm: startedState.vm,
logger: self.logger,
onDelete: { [weak self = self] in
onDelete: { [weak self] in
await self?.removeProcess(id: id)
}
)
Expand Down Expand Up @@ -959,7 +959,7 @@ extension LinuxContainer {
agent: agent,
vm: state.vm,
logger: self.logger,
onDelete: { [weak self = self] in
onDelete: { [weak self] in
await self?.removeProcess(id: id)
}
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerizationExtras/AsyncLock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public actor AsyncLock {
}

/// withLock provides a scoped locking API to run a function while holding the lock.
public func withLock<T: Sendable>(logMetadata: Logger.Metadata? = nil, _ body: @Sendable @escaping (Context) async throws -> T) async rethrows -> T {
public func withLock<T: Sendable>(logMetadata: Logger.Metadata? = nil, _ body: @Sendable (Context) async throws -> T) async rethrows -> T {
log?.debug("acquiring lock", metadata: logMetadata)
while self.busy {
await withCheckedContinuation { cc in
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerizationExtras/AsyncMutex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public actor AsyncMutex<T: Sendable> {

/// withLock provides a scoped locking API to run a function while holding the lock.
/// The protected value is passed to the closure for safe access.
public func withLock<R: Sendable>(_ body: @Sendable @escaping (inout T) async throws -> R) async rethrows -> R {
public func withLock<R: Sendable>(_ body: @Sendable (inout T) async throws -> R) async rethrows -> R {
while self.busy {
await withCheckedContinuation { cc in
self.queue.append(cc)
Expand Down