File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -30,22 +30,6 @@ import Swift
3030% THROWS = ''
3131% end
3232
33- @available(SwiftStdlib 6.2, *)
34- extension Task where Failure == ${FAILURE_TYPE} {
35-
36- @available(SwiftStdlib 6.2, *)
37- @available(*, deprecated, message: "Deprecated spelling of Task.immediate. This method will be removed.")
38- @discardableResult
39- @_alwaysEmitIntoClient // moved to AEIC in order to eventually remove this function.
40- public static func startSynchronously(
41- name: String? = nil,
42- priority: TaskPriority? = nil,
43- @_implicitSelfCapture @_inheritActorContext(always) _ operation: sending @isolated(any) @escaping () async ${THROWS} -> Success
44- ) -> Task<Success, ${FAILURE_TYPE}> {
45- immediate(name: name, priority: priority, operation: operation)
46- }
47- }
48-
4933% end
5034
5135// ==== Task.immediate(Detached) ---------------------------------------------------------
Original file line number Diff line number Diff line change @@ -436,11 +436,6 @@ print("call_taskImmediate_insideActor()")
436436
437437actor A {
438438 func f( ) {
439- Task . startSynchronously ( name: " hello " ) { print ( " Task.startSynchronously ( \( Task . name!) ) " ) }
440- Task . startSynchronously ( ) { print ( " Task.startSynchronously " ) }
441- }
442-
443- func f2( ) {
444439 Task . immediate ( name: " hello " ) { print ( " Task.immediate ( \( Task . name!) ) " ) }
445440 Task . immediate ( ) { print ( " Task.immediate " ) }
446441
@@ -449,11 +444,10 @@ actor A {
449444 }
450445}
451446
452- func call_startSynchronously_insideActor ( ) async {
447+ func call_immediate_insideActor ( ) async {
453448 await A ( ) . f ( )
454- await A ( ) . f2 ( )
455449}
456- await call_startSynchronously_insideActor ( )
450+ await call_immediate_insideActor ( )
457451
458452
459453print ( " \n \n ==== ------------------------------------------------------------------ " )
You can’t perform that action at this time.
0 commit comments