We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 163871c commit 0905767Copy full SHA for 0905767
libcxx/test/std/thread/futures/futures.async/wait_on_destruct.pass.cpp
@@ -15,13 +15,15 @@
15
// Make sure that the `future` destructor keeps the data alive until the thread finished. This test fails by triggering
16
// TSan. It may not be observable by normal means.
17
18
+// See https://github.com/llvm/llvm-project/pull/125433#issuecomment-2703618927 for more details.
19
+
20
#include <atomic>
21
#include <future>
22
#include <mutex>
23
24
std::mutex mux;
25
-int main() {
26
+int main(int, char**) {
27
using namespace std::chrono_literals;
28
std::unique_lock lock(mux);
29
std::atomic<bool> in_async = false;
@@ -34,4 +36,6 @@ int main() {
34
36
});
35
37
in_async.wait(true);
38
lock.unlock();
39
40
+ return 0;
41
}
0 commit comments