add spawn thread API and sample (#333)
This commit is contained in:
@ -116,7 +116,7 @@ The default value of N is 4, which means you can create 4 threads at most. This
|
||||
``` bash
|
||||
./iwasm --max-threads=n test.wasm
|
||||
```
|
||||
If you are going to develop your own runtime product, you can use the API `wasm_runtime_set_max_thread_num` to set the value, or you can change the macro `CLUSTER_MAX_THREAD_NUM` in [config.h](../core/config.h),
|
||||
If you are going to develop your own runtime product, you can use the API `wasm_runtime_set_max_thread_num` or init arg `init_args.max_thread_num` to set the value, or you can change the macro `CLUSTER_MAX_THREAD_NUM` in [config.h](../core/config.h).
|
||||
|
||||
> Note: the total size of aux stack reserved by compiler can be set with `-z stack-size` option during compilation. If you need to create more threads, please set a larger value, otherwise it is easy to cause aux stack overflow.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user