mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 15:05:19 +00:00
0f73ce1076
Update wasi-libc version to resolve the hang issue when running wasi-threads cases. Implement custom sync primitives as a counterpart of `pthread_barrier_wait` to attempt to replace pthread sync primitives since they seem to cause data races when running with the thread sanitizer.
23 lines
415 B
Markdown
23 lines
415 B
Markdown
# "WASI threads" sample introduction
|
|
|
|
To run the sample, `wasi-sdk` >= 20 is required.
|
|
|
|
## Build and run the samples
|
|
|
|
```shell
|
|
$ mkdir build
|
|
$ cd build
|
|
$ cmake ..
|
|
$ make
|
|
...
|
|
$ ./iwasm wasm-apps/no_pthread.wasm
|
|
```
|
|
|
|
## Run samples in AOT mode
|
|
```shell
|
|
$ ../../../wamr-compiler/build/wamrc \
|
|
--enable-multi-thread \
|
|
-o wasm-apps/no_pthread.aot wasm-apps/no_pthread.wasm
|
|
$ ./iwasm wasm-apps/no_pthread.aot
|
|
```
|