diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-08 14:04:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-08 14:04:48 +0200 |
| commit | 7234316dc7784667443d358b0d2c3e2ff561b474 (patch) | |
| tree | fbf0413aaa221acd2a8437b75cf5dd349471563c /test cases/wasm/2 threads/threads.cpp | |
| parent | a16db4e9185fcf060ea3e336cbffbe16018be934 (diff) | |
| parent | 654f427759d5aa3be55d8929b18c17a2b8fcac69 (diff) | |
| download | meson-7234316dc7784667443d358b0d2c3e2ff561b474.tar.gz | |
Merge pull request #6688 from dcbaker/emcc-linker-bugs
Emcc linker bugs and improvments
Diffstat (limited to 'test cases/wasm/2 threads/threads.cpp')
| -rw-r--r-- | test cases/wasm/2 threads/threads.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test cases/wasm/2 threads/threads.cpp b/test cases/wasm/2 threads/threads.cpp new file mode 100644 index 000000000..1caa73da3 --- /dev/null +++ b/test cases/wasm/2 threads/threads.cpp @@ -0,0 +1,13 @@ +#include <unistd.h> +#include <iostream> +#include <thread> + +int main(void) { + std::cout << "Before thread" << std::endl; + std::thread t([]() { + sleep(1); + std::cout << "In a thread." << std::endl; + }); + t.join(); + std::cout << "After thread" << std::endl; +} |
