@@ -773,8 +773,8 @@ void swift_task_enqueue(Job *job, SerialExecutorRef executor);
773773SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
774774void swift_task_enqueueGlobal (Job *job);
775775
776- // / Invoke an executor's `checkIsolated` or otherwise equivalent API,
777- // / that will crash if the current executor is NOT the passed executor.
776+ // / Invoke an executor's `checkIsolated` implementation;
777+ // / It will crash if the current executor is NOT the passed executor.
778778SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
779779void swift_task_checkIsolated (SerialExecutorRef executor);
780780
@@ -785,6 +785,15 @@ void swift_task_checkIsolated(SerialExecutorRef executor);
785785SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
786786bool swift_task_invokeSwiftCheckIsolated (SerialExecutorRef executor);
787787
788+ // / Invoke an executor's `isIsolatingCurrentContext` implementation;
789+ SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
790+ bool swift_task_isIsolatingCurrentContext (SerialExecutorRef executor);
791+
792+ // / Invoke a Swift executor's `isIsolatingCurrentContext` implementation; returns
793+ // / `true` if it invoked the Swift implementation, `false` otherwise.
794+ SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
795+ bool swift_task_invokeSwiftIsIsolatingCurrentContext (SerialExecutorRef executor);
796+
788797// / A count in nanoseconds.
789798using JobDelay = unsigned long long ;
790799
@@ -1037,6 +1046,10 @@ enum swift_task_is_current_executor_flag : uint64_t {
10371046
10381047 // / The routine should assert on failure.
10391048 Assert = 0x8 ,
1049+
1050+ // / The routine should use 'isIsolatingCurrentContext' function on the
1051+ // / 'expected' executor instead of `checkIsolated`.
1052+ HasIsIsolatingCurrentContext = 0x10 ,
10401053};
10411054
10421055SWIFT_EXPORT_FROM (swift_Concurrency)
0 commit comments