Skip to content

Conversation

@DougGregor
Copy link
Member

Add support for a new builtin Builtin.createAsyncTaskFuture, which allows us to form a call to
swift_task_create_future[_f] to create a new task future. Use this to implement incomplete
forms of two key operations:

  • Task.runDetached to launch a new task (it just executes the task directly)
  • Task.Handle.get to retrieve the result of a future (but crashes if the future didn't finish yet).

This new builtin allows the creation of a "future" task, which calls
down to swift_task_create_future to actually form the task.
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor marked this pull request as ready for review November 16, 2020 21:27
@DougGregor DougGregor merged commit cd8029a into swiftlang:main Nov 16, 2020
@DougGregor DougGregor deleted the concurrency-future-builtin branch November 16, 2020 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant