-
Notifications
You must be signed in to change notification settings - Fork 728
Open
Description
I had seen the issue #547
And I tried to use wasm_runtime_init_thread_env() and wasm_runtime_destroy_thread_env().
My code is like this:
1- call wasm_runtime_init_thread_env()
2- call wasm_runtime_call_wasm() and in wasm app create thread.
3- call wasm_runtime_destroy_thread_env() after wasm_runtime_call_wasm()
It works the first time. And wasm_runtime_init_thread_env returns true.
But the follows all went to crash. And wasm_runtime_init_thread_env return false. (I use the same thread as first time)
Then I just call wasm_runtime_init_thread_env one time in this thread. And I do not call wasm_runtime_destroy_thread_env any more.
Then it works well.
So I have some questions:
- Is there any bug in wasm_runtime_destroy_thread_env?
- Can I only call wasm_runtime_init_thread_env one time and never call wasm_runtime_destroy_thread_env in one thread?
- Can wasm_runtime_init_thread_env be used in other platform such as Android?
- Which thread don't need to call wasm_runtime_init_thread_env, the thread called wasm_runtime_init, the thread called wasm_runtime_create_exec_env or other?
Metadata
Metadata
Assignees
Labels
No labels