Skip to content

Commit fde8098

Browse files
committed
[Concurrency] remove workaround for void task handles rdar://74957357
1 parent a180f53 commit fde8098

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,13 @@ extension Task {
522522
// Create the asynchronous task future, it will do nothing, but simply serves
523523
// as a way for us to yield our execution until the executor gets to it and
524524
// resumes us.
525-
// FIXME: This should be an empty closure instead. Returning `0` here is
526-
// a workaround for rdar://74957357
527525
// TODO: consider if it would be useful for this task to be a child task
528-
let (task, _) = Builtin.createAsyncTaskFuture(flags.bits, nil, { return 0 })
526+
let (task, _) = Builtin.createAsyncTaskFuture(flags.bits, {})
529527

530528
// Enqueue the resulting job.
531529
_enqueueJobGlobal(Builtin.convertTaskToJob(task))
532530

533-
let _ = await Handle<Int, Never>(task).get()
531+
let _ = await Handle<Void, Never>(task).get()
534532
}
535533
}
536534

0 commit comments

Comments
 (0)