Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(web): clamp default number of threads to 3
Resolves: #1511 Firefox returns some random number for `navigator?.hardwareConcurrency`. In my case is was `16`, which does not correspond to the avaialble hardware in any way. Here I additionally clamp the value obtained from `navigator?.hardwareConcurrency` to a range from `DEFAULT_NUM_THREADS` to `MAXIMUM_NUM_THREADS` (currently from 2 to 3). This solves it for Firefox, but I don't have a physical mac handy to test Safari. Not sure if testing on Browserstack is accurate - it probably runs on a VM.
- Loading branch information