File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,11 @@ class TaskGroupBase : public TaskGroupTaskStatusRecord {
292292 };
293293
294294protected:
295+ // Guard with SWIFT_THREADING_NONE and not just SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY
296+ // because the latter just means that the global executor is cooperative,
297+ // but it doesn't mean that the target platform is always single-threaded. For example, on
298+ // wasm32-unknown-wasip1-threads, the global executor is cooperative, but users can still set up their
299+ // own TaskExecutor with multiple threads.
295300#if SWIFT_THREADING_NONE || SWIFT_CONCURRENCY_TASK_TO_THREAD_MODEL
296301 // Synchronization is simple here. In a single threaded mode, all swift tasks
297302 // run on a single thread so no coordination is needed. In a task-to-thread
You can’t perform that action at this time.
0 commit comments