diff options
author | crupest <crupest@outlook.com> | 2021-06-09 21:59:17 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-09 21:59:17 +0800 |
commit | a2cf634d1bceb3614b1f5adcab5b2b41cddbd3c4 (patch) | |
tree | 9f3316e647072c96e90966680e3f60d09bac214f /operating-system-experiment/main.cpp | |
parent | 33e77f49de0cdeda25d9fc3bc36915d4713c0b6b (diff) | |
download | life-a2cf634d1bceb3614b1f5adcab5b2b41cddbd3c4.tar.gz life-a2cf634d1bceb3614b1f5adcab5b2b41cddbd3c4.tar.bz2 life-a2cf634d1bceb3614b1f5adcab5b2b41cddbd3c4.zip |
Add operating system experiement.
Diffstat (limited to 'operating-system-experiment/main.cpp')
-rw-r--r-- | operating-system-experiment/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/operating-system-experiment/main.cpp b/operating-system-experiment/main.cpp new file mode 100644 index 0000000..ada8c85 --- /dev/null +++ b/operating-system-experiment/main.cpp @@ -0,0 +1,16 @@ +#include "Thread.h"
+
+#include <iostream>
+#include <string>
+
+int main() {
+ cru::Thread thread1([](const std::string &s) { std::cout << s; },
+ "Hello world! 1\n");
+ thread1.Join();
+
+ cru::Thread thread2([](const std::string &s) { std::cout << s; },
+ "Hello world! 2\n");
+ thread2.Join();
+
+ return 0;
+}
|