Skip to content

Commit 3d637d1

Browse files
committed
document the get active current executor method
1 parent f90b4ff commit 3d637d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/swift/Runtime/Concurrency.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,11 @@ struct ExecutorActiveAndRef {
901901
ExecutorRef ref;
902902
};
903903

904+
/// Different than `swift_task_getCurrentExecutor` in that it does not default to the generic executor.
905+
/// This method is to be used if we are interested specifically IF we have an executor set in this context,
906+
/// and if so, which one it is. If no executor is available in the current context, the `active` bool will be false.
904907
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
905-
ExecutorActiveAndRef swift_task_getCurrentActiveExecutorRef();
908+
ExecutorActiveAndRef swift_task_getCurrentActiveExecutorRef(void);
906909

907910
SWIFT_EXPORT_FROM(swift_Concurrency) SWIFT_CC(swift)
908911
void swift_task_reportUnexpectedExecutor(

stdlib/public/Concurrency/TaskGroup.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
632632
/// } catch {
633633
/// // other errors though we print and cancel the group,
634634
/// // and all of the remaining child tasks within it.
635-
/// print("Error: \(error)")
636635
/// group.cancelAll()
637636
/// }
638637
/// }

0 commit comments

Comments
 (0)