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 aa5b505 commit a37e318Copy full SHA for a37e318
stdlib/public/Distributed/DistributedActor.swift
@@ -362,9 +362,9 @@ extension DistributedActor {
362
/// state.
363
///
364
/// When the actor is remote, the closure won't be executed and this function will return nil.
365
- public nonisolated func whenLocal<T: Sendable>(
366
- _ body: @Sendable (isolated Self) async throws -> T
367
- ) async rethrows -> T? {
+ public nonisolated func whenLocal<T: Sendable, E>(
+ _ body: @Sendable (isolated Self) async throws(E) -> T
+ ) async throws(E) -> T? {
368
if __isLocalActor(self) {
369
_local let localSelf = self
370
return try await body(localSelf)
0 commit comments