diff --git a/Sources/Containerization/LinuxContainer.swift b/Sources/Containerization/LinuxContainer.swift index cfdc5f64..f871cabc 100644 --- a/Sources/Containerization/LinuxContainer.swift +++ b/Sources/Containerization/LinuxContainer.swift @@ -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) } ) @@ -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) } ) diff --git a/Sources/ContainerizationExtras/AsyncLock.swift b/Sources/ContainerizationExtras/AsyncLock.swift index a3c14b43..801388b6 100644 --- a/Sources/ContainerizationExtras/AsyncLock.swift +++ b/Sources/ContainerizationExtras/AsyncLock.swift @@ -34,7 +34,7 @@ public actor AsyncLock { } /// withLock provides a scoped locking API to run a function while holding the lock. - public func withLock(logMetadata: Logger.Metadata? = nil, _ body: @Sendable @escaping (Context) async throws -> T) async rethrows -> T { + public func withLock(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 diff --git a/Sources/ContainerizationExtras/AsyncMutex.swift b/Sources/ContainerizationExtras/AsyncMutex.swift index 83652de5..cd668c0f 100644 --- a/Sources/ContainerizationExtras/AsyncMutex.swift +++ b/Sources/ContainerizationExtras/AsyncMutex.swift @@ -36,7 +36,7 @@ public actor AsyncMutex { /// 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(_ body: @Sendable @escaping (inout T) async throws -> R) async rethrows -> R { + public func withLock(_ body: @Sendable (inout T) async throws -> R) async rethrows -> R { while self.busy { await withCheckedContinuation { cc in self.queue.append(cc)