2727
2828namespace swift {
2929class DefaultActor ;
30+ class TaskOptionRecord ;
3031
3132struct SwiftError ;
3233
@@ -35,54 +36,53 @@ struct AsyncTaskAndContext {
3536 AsyncContext *InitialContext;
3637};
3738
38- // / Create a task object with no future which will run the given
39- // / function.
39+ // / Create a task object with no future which will run the given function.
4040SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
41- AsyncTaskAndContext swift_task_create_f (size_t flags,
42- ThinNullaryAsyncSignature::FunctionType *function,
43- size_t initialContextSize);
41+ AsyncTaskAndContext swift_task_create_f (
42+ size_t flags,
43+ TaskOptionRecord *options,
44+ ThinNullaryAsyncSignature::FunctionType *function, size_t initialContextSize);
4445
4546// / Caution: not all future-initializing functions actually throw, so
4647// / this signature may be incorrect.
4748using FutureAsyncSignature =
4849 AsyncSignature<void (void *), /* throws*/ true >;
4950
50- // / Create a task object with a future which will run the given
51- // / closure.
51+ // / Create a task object with a future which will run the given closure.
5252SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
5353AsyncTaskAndContext swift_task_create_future (
5454 size_t flags,
55+ TaskOptionRecord *options,
5556 const Metadata *futureResultType,
56- void *closureEntryPoint,
57- HeapObject * /* +1 */ closureContext);
57+ void *closureEntryPoint, HeapObject * /* +1 */ closureContext);
5858
59- // / Create a task object with a future which will run the given
60- // / function.
59+ // / Create a task object with a future which will run the given function.
6160SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
6261AsyncTaskAndContext swift_task_create_future_f (
6362 size_t flags,
63+ TaskOptionRecord *options,
6464 const Metadata *futureResultType,
65- FutureAsyncSignature::FunctionType *function,
66- size_t initialContextSize);
65+ FutureAsyncSignature::FunctionType *function, size_t initialContextSize);
6766
6867// / Create a task object with a future which will run the given
6968// / closure, and offer its result to the task group
7069SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
7170AsyncTaskAndContext swift_task_create_group_future (
72- size_t flags, TaskGroup *group,
71+ size_t flags,
72+ TaskGroup *group,
73+ TaskOptionRecord *options,
7374 const Metadata *futureResultType,
74- void *closureEntryPoint,
75- HeapObject * /* +1 */ closureContext);
75+ void *closureEntryPoint, HeapObject * /* +1 */ closureContext);
7676
7777// / Create a task object with a future which will run the given
7878// / function, and offer its result to the task group
7979SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
8080AsyncTaskAndContext swift_task_create_group_future_f (
8181 size_t flags,
8282 TaskGroup *group,
83+ TaskOptionRecord *options,
8384 const Metadata *futureResultType,
84- FutureAsyncSignature::FunctionType *function,
85- size_t initialContextSize);
85+ FutureAsyncSignature::FunctionType *function, size_t initialContextSize);
8686
8787// / Allocate memory in a task.
8888// /
@@ -270,16 +270,16 @@ bool swift_taskGroup_isEmpty(TaskGroup *group);
270270// /
271271// / \code
272272// / func swift_asyncLet_start<T>(
273- // / _ alet: Builtin.RawPointer,
273+ // / asyncLet: Builtin.RawPointer,
274+ // / options: Builtin.RawPointer?,
274275// / operation: __owned @Sendable () async throws -> T
275276// / )
276277// / \endcode
277278SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
278- void swift_asyncLet_start (
279- AsyncLet *alet,
280- const Metadata *futureResultType,
281- void *closureEntryPoint,
282- void *closureContext);
279+ void swift_asyncLet_start (AsyncLet *alet,
280+ TaskOptionRecord *options,
281+ const Metadata *futureResultType,
282+ void *closureEntryPoint, void *closureContext);
283283
284284// / This matches the ABI of a closure `<T>(Builtin.RawPointer) async -> T`
285285using AsyncLetWaitSignature =
0 commit comments