File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -95,25 +95,17 @@ public protocol SchedulableExecutor: Executor {
9595
9696extension Actor {
9797
98- /// Perform an operation with the actor's ``SerialExecutor``.
99- ///
100- /// This converts the actor's ``Actor/unownedExecutor`` to a ``SerialExecutor`` while
101- /// retaining the actor for the duration of the operation. This is to ensure the lifetime
102- /// of the executor while performing the operation.
98+ // FIXME: SE evolution: these should be removed in favor of an 'executor' property
10399 @_alwaysEmitIntoClient
104100 @available ( SwiftStdlib 5 . 1 , * )
105- public nonisolated func withSerialExecutor < T> ( _ operation: ( any SerialExecutor ) throws -> T ) rethrows -> T {
101+ public nonisolated func _withSerialExecutor < T> ( _ operation: ( any SerialExecutor ) throws -> T ) rethrows -> T {
106102 try operation ( unsafe unsafeBitCast( self . unownedExecutor, to: ( any SerialExecutor ) . self) )
107103 }
108104
109- /// Perform an operation with the actor's ``SerialExecutor``.
110- ///
111- /// This converts the actor's ``Actor/unownedExecutor`` to a ``SerialExecutor`` while
112- /// retaining the actor for the duration of the operation. This is to ensure the lifetime
113- /// of the executor while performing the operation.
105+ // FIXME: SE evolution: these should be removed in favor of an 'executor' property
114106 @_alwaysEmitIntoClient
115107 @available ( SwiftStdlib 5 . 1 , * )
116- public nonisolated func withSerialExecutor < T> ( _ operation: ( any SerialExecutor ) async throws -> T ) async rethrows -> T {
108+ public nonisolated func _withSerialExecutor < T> ( _ operation: ( any SerialExecutor ) async throws -> T ) async rethrows -> T {
117109 try await operation ( unsafe unsafeBitCast( self . unownedExecutor, to: ( any SerialExecutor ) . self) )
118110 }
119111}
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ actor ActorOnIsCheckImplementingExecutor<Ex: SerialExecutor> {
113113
114114 let anyActor : any Actor = hasIsCheckActor
115115
116- anyActor. withSerialExecutor { se in
116+ anyActor. _withSerialExecutor { se in
117117 let outside = se. isIsolatingCurrentContext ( )
118118 assert ( outside == true ) // This is just a mock executor impl that always returns "true" (it is lying)
119119 // CHECK: called: isIsolatingCurrentContext
You can’t perform that action at this time.
0 commit comments