Skip to content

Commit 4b882a8

Browse files
authored
Use typed throws in withSerialExecutor
1 parent 9a79671 commit 4b882a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proposals/0471-SerialExecutor-isIsolated.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ extension Actor {
150150
/// of the executor while performing the operation.
151151
@_alwaysEmitIntoClient
152152
@available(SwiftStdlib 5.1, *)
153-
public nonisolated func withSerialExecutor<T>(_ operation: (any SerialExecutor) throws -> T) rethrows -> T
153+
public nonisolated func withSerialExecutor<T, E: Error>(_ operation: (any SerialExecutor) throws(E) -> T) throws(E) -> T
154154

155155
/// Perform an operation with the actor's ``SerialExecutor``.
156156
///
@@ -159,7 +159,7 @@ extension Actor {
159159
/// of the executor while performing the operation.
160160
@_alwaysEmitIntoClient
161161
@available(SwiftStdlib 5.1, *)
162-
public nonisolated func withSerialExecutor<T>(_ operation: (any SerialExecutor) async throws -> T) async rethrows -> T
162+
public nonisolated func withSerialExecutor<T, E: Error>(_ operation: (any SerialExecutor) async throws(E) -> T) async throws(E) -> T
163163

164164
}
165165
```

0 commit comments

Comments
 (0)