File tree Expand file tree Collapse file tree 10 files changed +43
-43
lines changed
libcxx/test/std/thread/thread.condition
thread.condition.condvarany Expand file tree Collapse file tree 10 files changed +43
-43
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ int main(int, char**) {
43
43
// happen that we get awoken spuriously and fail to recognize it
44
44
// (making this test useless), but the likelihood should be small.
45
45
{
46
- std::atomic<bool > ready = false ;
47
- std::atomic<bool > likely_spurious = true ;
46
+ std::atomic<bool > ready ( false ) ;
47
+ std::atomic<bool > likely_spurious ( true ) ;
48
48
auto timeout = std::chrono::seconds (3600 );
49
49
std::condition_variable cv;
50
50
std::mutex mutex;
Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ int main(int, char**) {
43
43
// the likelihood that we got awoken by a spurious wakeup by updating the
44
44
// likely_spurious flag only immediately before we perform the notification.
45
45
{
46
- std::atomic<bool > ready = false ;
47
- std::atomic<bool > likely_spurious = true ;
48
- auto timeout = std::chrono::seconds (3600 );
46
+ std::atomic<bool > ready ( false ) ;
47
+ std::atomic<bool > likely_spurious ( true ) ;
48
+ auto timeout = std::chrono::seconds (3600 );
49
49
std::condition_variable cv;
50
50
std::mutex mutex;
51
51
@@ -110,9 +110,9 @@ int main(int, char**) {
110
110
// taken. In particular, we do need to eventually ensure we get out of the wait
111
111
// by standard means, so we actually wake up the thread at the end.
112
112
{
113
- std::atomic<bool > ready = false ;
114
- std::atomic<bool > awoken = false ;
115
- auto timeout = std::chrono::seconds (3600 );
113
+ std::atomic<bool > ready ( false ) ;
114
+ std::atomic<bool > awoken ( false ) ;
115
+ auto timeout = std::chrono::seconds (3600 );
116
116
std::condition_variable cv;
117
117
std::mutex mutex;
118
118
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ int main(int, char**) {
31
31
// spurious wakeup by updating the likely_spurious flag only immediately
32
32
// before we perform the notification.
33
33
{
34
- std::atomic<bool > ready = false ;
35
- std::atomic<bool > likely_spurious = true ;
34
+ std::atomic<bool > ready ( false ) ;
35
+ std::atomic<bool > likely_spurious ( true ) ;
36
36
std::condition_variable cv;
37
37
std::mutex mutex;
38
38
@@ -70,8 +70,8 @@ int main(int, char**) {
70
70
// taken. In particular, we do need to eventually ensure we get out of the wait
71
71
// by standard means, so we actually wake up the thread at the end.
72
72
{
73
- std::atomic<bool > ready = false ;
74
- std::atomic<bool > awoken = false ;
73
+ std::atomic<bool > ready ( false ) ;
74
+ std::atomic<bool > awoken ( false ) ;
75
75
std::condition_variable cv;
76
76
std::mutex mutex;
77
77
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ void test() {
49
49
// happen that we get awoken spuriously and fail to recognize it
50
50
// (making this test useless), but the likelihood should be small.
51
51
{
52
- std::atomic<bool > ready = false ;
53
- std::atomic<bool > likely_spurious = true ;
54
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
52
+ std::atomic<bool > ready ( false ) ;
53
+ std::atomic<bool > likely_spurious ( true ) ;
54
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
55
55
std::condition_variable cv;
56
56
std::mutex mutex;
57
57
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ void test() {
49
49
// the likelihood that we got awoken by a spurious wakeup by updating the
50
50
// likely_spurious flag only immediately before we perform the notification.
51
51
{
52
- std::atomic<bool > ready = false ;
53
- std::atomic<bool > likely_spurious = true ;
54
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
52
+ std::atomic<bool > ready ( false ) ;
53
+ std::atomic<bool > likely_spurious ( true ) ;
54
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
55
55
std::condition_variable cv;
56
56
std::mutex mutex;
57
57
@@ -112,9 +112,9 @@ void test() {
112
112
// taken. In particular, we do need to eventually ensure we get out of the wait
113
113
// by standard means, so we actually wake up the thread at the end.
114
114
{
115
- std::atomic<bool > ready = false ;
116
- std::atomic<bool > awoken = false ;
117
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
115
+ std::atomic<bool > ready ( false ) ;
116
+ std::atomic<bool > awoken ( false ) ;
117
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
118
118
std::condition_variable cv;
119
119
std::mutex mutex;
120
120
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ void test() {
49
49
// happen that we get awoken spuriously and fail to recognize it
50
50
// (making this test useless), but the likelihood should be small.
51
51
{
52
- std::atomic<bool > ready = false ;
53
- std::atomic<bool > likely_spurious = true ;
54
- auto timeout = std::chrono::seconds (3600 );
52
+ std::atomic<bool > ready ( false ) ;
53
+ std::atomic<bool > likely_spurious ( true ) ;
54
+ auto timeout = std::chrono::seconds (3600 );
55
55
std::condition_variable_any cv;
56
56
Mutex mutex;
57
57
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ void test() {
49
49
// the likelihood that we got awoken by a spurious wakeup by updating the
50
50
// likely_spurious flag only immediately before we perform the notification.
51
51
{
52
- std::atomic<bool > ready = false ;
53
- std::atomic<bool > likely_spurious = true ;
54
- auto timeout = std::chrono::seconds (3600 );
52
+ std::atomic<bool > ready ( false ) ;
53
+ std::atomic<bool > likely_spurious ( true ) ;
54
+ auto timeout = std::chrono::seconds (3600 );
55
55
std::condition_variable_any cv;
56
56
Mutex mutex;
57
57
@@ -116,9 +116,9 @@ void test() {
116
116
// taken. In particular, we do need to eventually ensure we get out of the wait
117
117
// by standard means, so we actually wake up the thread at the end.
118
118
{
119
- std::atomic<bool > ready = false ;
120
- std::atomic<bool > awoken = false ;
121
- auto timeout = std::chrono::seconds (3600 );
119
+ std::atomic<bool > ready ( false ) ;
120
+ std::atomic<bool > awoken ( false ) ;
121
+ auto timeout = std::chrono::seconds (3600 );
122
122
std::condition_variable_any cv;
123
123
Mutex mutex;
124
124
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ void test() {
39
39
// spurious wakeup by updating the likely_spurious flag only immediately
40
40
// before we perform the notification.
41
41
{
42
- std::atomic<bool > ready = false ;
43
- std::atomic<bool > likely_spurious = true ;
42
+ std::atomic<bool > ready ( false ) ;
43
+ std::atomic<bool > likely_spurious ( true ) ;
44
44
std::condition_variable_any cv;
45
45
Mutex mutex;
46
46
@@ -78,8 +78,8 @@ void test() {
78
78
// taken. In particular, we do need to eventually ensure we get out of the wait
79
79
// by standard means, so we actually wake up the thread at the end.
80
80
{
81
- std::atomic<bool > ready = false ;
82
- std::atomic<bool > awoken = false ;
81
+ std::atomic<bool > ready ( false ) ;
82
+ std::atomic<bool > awoken ( false ) ;
83
83
std::condition_variable_any cv;
84
84
Mutex mutex;
85
85
Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ void test() {
54
54
// happen that we get awoken spuriously and fail to recognize it
55
55
// (making this test useless), but the likelihood should be small.
56
56
{
57
- std::atomic<bool > ready = false ;
58
- std::atomic<bool > likely_spurious = true ;
59
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
57
+ std::atomic<bool > ready ( false ) ;
58
+ std::atomic<bool > likely_spurious ( true ) ;
59
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
60
60
std::condition_variable_any cv;
61
61
Mutex mutex;
62
62
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ void test() {
55
55
// the likelihood that we got awoken by a spurious wakeup by updating the
56
56
// likely_spurious flag only immediately before we perform the notification.
57
57
{
58
- std::atomic<bool > ready = false ;
59
- std::atomic<bool > likely_spurious = true ;
60
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
58
+ std::atomic<bool > ready ( false ) ;
59
+ std::atomic<bool > likely_spurious ( true ) ;
60
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
61
61
std::condition_variable_any cv;
62
62
Mutex mutex;
63
63
@@ -118,9 +118,9 @@ void test() {
118
118
// taken. In particular, we do need to eventually ensure we get out of the wait
119
119
// by standard means, so we actually wake up the thread at the end.
120
120
{
121
- std::atomic<bool > ready = false ;
122
- std::atomic<bool > awoken = false ;
123
- auto timeout = Clock::now () + std::chrono::seconds (3600 );
121
+ std::atomic<bool > ready ( false ) ;
122
+ std::atomic<bool > awoken ( false ) ;
123
+ auto timeout = Clock::now () + std::chrono::seconds (3600 );
124
124
std::condition_variable_any cv;
125
125
Mutex mutex;
126
126
You can’t perform that action at this time.
0 commit comments