mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-10-20 16:01:24 +00:00
Fix issues in the libc-wasi `poll_oneoff` when thread manager is enabled:
- The exception of a thread may be cleared when other thread runs into
`proc_exit` and then calls `clear_wasi_proc_exit_exception`, so should not
use `wasm_runtime_get_exception` to check whether an exception was
thrown, use `wasm_cluster_is_thread_terminated` instead
- We divided one time poll_oneoff into many times poll_oneoff to check
the exception to avoid long time waiting in previous PR, but if all events
returned by one time poll are all waiting events, we need to continue to
wait but not return directly.
Follow-up on #1951. Tested with multiple timeout values, with and without
interruption and measured the time spent sleeping.
|
||
|---|---|---|
| .. | ||
| sandboxed-system-primitives | ||
| libc_wasi_wrapper.c | ||
| libc_wasi_wrapper.h | ||
| libc_wasi.cmake | ||
| SConscript | ||