File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,9 @@ public func _runAsyncHandler(operation: @escaping () async -> ()) {
472472 )
473473}
474474
475+ // ==== Async Sleep ------------------------------------------------------------
475476
477+ extension Task {
476478 /// Suspends the current task for _at least_ the given duration
477479 /// in nanoseconds.
478480 ///
@@ -494,6 +496,8 @@ public func _runAsyncHandler(operation: @escaping () async -> ()) {
494496
495497 let _ = await Handle < Int , Never > ( task) . get ( )
496498 }
499+ }
500+
497501// ==== UnsafeCurrentTask ------------------------------------------------------
498502
499503extension Task {
Original file line number Diff line number Diff line change 1- // RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency -parse-as-library)
1+ // RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency -parse-as-library) | %FileCheck %s --dump-input always
22// REQUIRES: executable_test
33// REQUIRES: concurrency
44
@@ -35,6 +35,8 @@ import Dispatch
3535
3636 print ( " Run second " )
3737
38+ // CHECK: Run first
39+ // CHECK: Run second
3840 await task. get ( )
3941 }
4042}
You can’t perform that action at this time.
0 commit comments