@@ -773,8 +773,8 @@ void swift_task_enqueue(Job *job, SerialExecutorRef executor);
773
773
SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
774
774
void swift_task_enqueueGlobal (Job *job);
775
775
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.
778
778
SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
779
779
void swift_task_checkIsolated (SerialExecutorRef executor);
780
780
@@ -785,6 +785,15 @@ void swift_task_checkIsolated(SerialExecutorRef executor);
785
785
SWIFT_EXPORT_FROM (swift_Concurrency) SWIFT_CC(swift)
786
786
bool swift_task_invokeSwiftCheckIsolated (SerialExecutorRef executor);
787
787
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
+
788
797
// / A count in nanoseconds.
789
798
using JobDelay = unsigned long long ;
790
799
@@ -1037,6 +1046,10 @@ enum swift_task_is_current_executor_flag : uint64_t {
1037
1046
1038
1047
// / The routine should assert on failure.
1039
1048
Assert = 0x8 ,
1049
+
1050
+ // / The routine should use 'isIsolatingCurrentContext' function on the
1051
+ // / 'expected' executor instead of `checkIsolated`.
1052
+ HasIsIsolatingCurrentContext = 0x10 ,
1040
1053
};
1041
1054
1042
1055
SWIFT_EXPORT_FROM (swift_Concurrency)
0 commit comments