Skip to content

Commit f059e58

Browse files
committed
Revert "[libc++] Don't try to wait on a thread that hasn't started in std::async (#125433)"
This reverts commit 11766a4.
1 parent 9d37e61 commit f059e58

File tree

2 files changed

+2
-66
lines changed

2 files changed

+2
-66
lines changed

libcxx/include/future

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,7 @@ void __async_assoc_state<_Rp, _Fp>::__execute() {
865865

866866
template <class _Rp, class _Fp>
867867
void __async_assoc_state<_Rp, _Fp>::__on_zero_shared() _NOEXCEPT {
868-
if (base::__state_ & base::__constructed)
869-
this->wait();
868+
this->wait();
870869
base::__on_zero_shared();
871870
}
872871

@@ -903,8 +902,7 @@ void __async_assoc_state<void, _Fp>::__execute() {
903902

904903
template <class _Fp>
905904
void __async_assoc_state<void, _Fp>::__on_zero_shared() _NOEXCEPT {
906-
if (base::__state_ & base::__constructed)
907-
this->wait();
905+
this->wait();
908906
base::__on_zero_shared();
909907
}
910908

libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)