File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ class ThreadedPromise
6161
6262 bool has_completed ()
6363 {
64- Threading::MutexLocker locker { m_mutex };
6564 return m_has_completed;
6665 }
6766
@@ -183,7 +182,7 @@ class ThreadedPromise
183182 Function<ErrorOr<void >(ResultType&&)> m_resolution_handler;
184183 Function<void (ErrorType&&)> m_rejection_handler;
185184 Threading::Mutex m_mutex;
186- bool m_has_completed;
185+ Atomic< bool > m_has_completed;
187186};
188187
189188}
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ TEST_CASE(threaded_promise_resolved_later)
158158{
159159 Core::EventLoop loop;
160160
161- IGNORE_USE_IN_ESCAPING_LAMBDA bool unblock_thread = false ;
161+ IGNORE_USE_IN_ESCAPING_LAMBDA Atomic< bool > unblock_thread = false ;
162162 bool resolved = false ;
163163 bool rejected = true ;
164164 Optional<pthread_t > thread_id;
You can’t perform that action at this time.
0 commit comments