We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d0616c commit a29d971Copy full SHA for a29d971
1 file changed
examples/multithreading.cpp
@@ -1,6 +1,7 @@
1
#include <cstdint>
2
#include <cstdlib>
3
#include <iostream>
4
+#include <sstream>
5
#include <thread>
6
#include <utility>
7
@@ -15,7 +16,9 @@ int main()
15
16
// Read
17
const auto out = [](msd::channel<std::int64_t>& ch, std::size_t i) {
18
for (auto number : ch) {
- std::cout << number << " from thread: " << i << '\n';
19
+ std::stringstream stream;
20
+ stream << number << " from thread: " << i << '\n';
21
+ std::cout << stream.str();
22
std::this_thread::sleep_for(std::chrono::milliseconds(500));
23
}
24
};
0 commit comments