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 -> ()) {
472
472
)
473
473
}
474
474
475
+ // ==== Async Sleep ------------------------------------------------------------
475
476
477
+ extension Task {
476
478
/// Suspends the current task for _at least_ the given duration
477
479
/// in nanoseconds.
478
480
///
@@ -494,6 +496,8 @@ public func _runAsyncHandler(operation: @escaping () async -> ()) {
494
496
495
497
let _ = await Handle < Int , Never > ( task) . get ( )
496
498
}
499
+ }
500
+
497
501
// ==== UnsafeCurrentTask ------------------------------------------------------
498
502
499
503
extension 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
2
2
// REQUIRES: executable_test
3
3
// REQUIRES: concurrency
4
4
@@ -35,6 +35,8 @@ import Dispatch
35
35
36
36
print ( " Run second " )
37
37
38
+ // CHECK: Run first
39
+ // CHECK: Run second
38
40
await task. get ( )
39
41
}
40
42
}
You can’t perform that action at this time.
0 commit comments