Skip to content

Commit 568b682

Browse files
authored
Merge pull request #70349 from apple/rokhinip/PR-119415891-TaskGroup-mutex
Use Mutex from threading package instead of std::mutex
2 parents a076d54 + ffd1ad2 commit 568b682

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

stdlib/public/Concurrency/TaskGroup.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
#include <atomic>
3636
#include <new>
3737

38-
#if !SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY
39-
#include <mutex>
40-
#endif
41-
4238
#if SWIFT_STDLIB_HAS_ASL
4339
#include <asl.h>
4440
#elif defined(__ANDROID__)
@@ -310,7 +306,7 @@ class TaskGroupBase : public TaskGroupTaskStatusRecord {
310306
void unlock() const {}
311307
#else
312308
// TODO: move to lockless via the status atomic (make readyQueue an mpsc_queue_t<ReadyQueueItem>)
313-
mutable std::mutex mutex_;
309+
mutable Mutex mutex_;
314310

315311
void lock() const { mutex_.lock(); }
316312
void unlock() const { mutex_.unlock(); }

0 commit comments

Comments
 (0)