質問編集履歴
1
コードを一部修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,15 +102,13 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
// values.reset(); // NG その1の場合、ここでreset()
|
106
|
-
|
107
105
|
this_thread::yield();
|
108
106
|
|
109
107
|
}
|
110
108
|
|
111
109
|
}
|
112
110
|
|
113
|
-
void write()
|
111
|
+
void writer()
|
114
112
|
|
115
113
|
{
|
116
114
|
|
@@ -164,7 +162,7 @@
|
|
164
162
|
|
165
163
|
unique_ptr<thread> reader_thread(new thread(reader));
|
166
164
|
|
167
|
-
unique_ptr<thread> writer_thread(new thread(write));
|
165
|
+
unique_ptr<thread> writer_thread(new thread(writer));
|
168
166
|
|
169
167
|
|
170
168
|
|