Skip to content

Commit df1c81e

Browse files
Azoysusmonteiro
authored andcommitted
Adopt inout sending for Mutex
1 parent 30753e9 commit df1c81e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Synchronization/Mutex/Mutex.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension Mutex where Value: ~Copyable {
8585
@_alwaysEmitIntoClient
8686
@_transparent
8787
public borrowing func withLock<Result: ~Copyable, E: Error>(
88-
_ body: @Sendable (inout Value) throws(E) -> sending Result
88+
_ body: (inout sending Value) throws(E) -> sending Result
8989
) throws(E) -> sending Result {
9090
handle._lock()
9191

@@ -132,7 +132,7 @@ extension Mutex where Value: ~Copyable {
132132
@_alwaysEmitIntoClient
133133
@_transparent
134134
public borrowing func withLockIfAvailable<Result: ~Copyable, E: Error>(
135-
_ body: @Sendable (inout Value) throws(E) -> sending Result
135+
_ body: (inout sending Value) throws(E) -> sending Result
136136
) throws(E) -> sending Result? {
137137
guard handle._tryLock() else {
138138
return nil

0 commit comments

Comments
 (0)