Skip to content

Can I use wamr in multithreaded environment? #3012

Answered by wenyongh
NinevskiyK asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, for "thread signal env not inited", maybe you can try calling wasm_runtime_init_thread_env in the beginning of the new thread's callback, and wasm_runtime_destroy_thread_env in the end of the callback. Refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/include/wasm_export.h#L719-L738

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NinevskiyK
Comment options

Answer selected by NinevskiyK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants