emscripten-core / emscripten-core/emscripten
Feature Request: Control hardware concurrency reported to C/C++
Open
wontfix
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Currently Emscripten generates the following syscall stub, which hardcodes `navigator.hardwareConcurrency` as CPU count reported back to C/C++.
```js
case 84:
{
if (typeof navigator === "object") return navigator["hardwareConcurrency"] || 1;
return 1;
}
```
It'd be great to have more control over this. For example in case of LLDB/LLVM, the thread pools will always use this concurrency, and thus they'll try to spawn 96 workers on my CloudTop, unless I manually hack LLVM :-)
Contributor guide
Assessment
This issue has not been assessed yet.