We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de5e3c3 commit 42ef73fCopy full SHA for 42ef73f
Sources/ServiceContextModule/ServiceContext.swift
@@ -219,7 +219,8 @@ extension ServiceContext {
219
///
220
/// - Parameter body: The closure to be invoked for each item stored in this `ServiceContext`,
221
/// passing the type-erased key and the associated value.
222
- public func forEach(_ body: (AnyServiceContextKey, Any) throws -> Void) rethrows {
+ @preconcurrency
223
+ public func forEach(_ body: (AnyServiceContextKey, any Sendable) throws -> Void) rethrows {
224
// swift-format-ignore: ReplaceForEachWithForLoop
225
try self._storage.forEach { key, value in
226
try body(key, value)
0 commit comments