@@ -392,12 +392,9 @@ extension Task {
392
392
@discardableResult
393
393
public static func runDetached< T> (
394
394
priority: Priority = . default,
395
- startingOn executor: ExecutorRef ? = nil ,
396
395
operation: @concurrent @escaping ( ) async -> T
397
396
// TODO: Allow inheriting task-locals?
398
397
) -> Handle < T , Never > {
399
- assert ( executor == nil , " Custom executor support is not implemented yet. " ) // FIXME
400
-
401
398
// Set up the job flags for a new task.
402
399
var flags = JobFlags ( )
403
400
flags. kind = . task
@@ -448,11 +445,8 @@ extension Task {
448
445
@discardableResult
449
446
public static func runDetached< T, Failure> (
450
447
priority: Priority = . default,
451
- startingOn executor: ExecutorRef ? = nil ,
452
448
operation: @concurrent @escaping ( ) async throws -> T
453
449
) -> Handle < T , Failure > {
454
- assert ( executor == nil , " Custom executor support is not implemented yet. " ) // FIXME
455
-
456
450
// Set up the job flags for a new task.
457
451
var flags = JobFlags ( )
458
452
flags. kind = . task
@@ -478,22 +472,6 @@ public func _runAsyncHandler(operation: @escaping () async -> ()) {
478
472
)
479
473
}
480
474
481
- // ==== Voluntary Suspension -----------------------------------------------------
482
-
483
- extension Task {
484
-
485
- /// Explicitly suspend the current task, potentially giving up execution actor
486
- /// of current actor/task, allowing other tasks to execute.
487
- ///
488
- /// This is not a perfect cure for starvation;
489
- /// if the task is the highest-priority task in the system, it might go
490
- /// immediately back to executing.
491
- @available ( * , deprecated, message: " Not implemented yet. " )
492
- public static func yield( ) async {
493
- fatalError ( " \( #function) not implemented yet. " )
494
- }
495
- }
496
-
497
475
// ==== UnsafeCurrentTask ------------------------------------------------------
498
476
499
477
extension Task {
0 commit comments