mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 915167 - Don't create helper threads when GetCPUCount() == 1 (r=bhackett)
--HG-- extra : rebase_source : 2bdf6c0df177361d004f63162dbe219665a3a269
This commit is contained in:
parent
442973e54e
commit
b6645f5b3a
@ -1602,8 +1602,10 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
/* Number of helper threads which should be created for this runtime. */
|
||||
size_t helperThreadCount() const {
|
||||
#ifdef JS_WORKER_THREADS
|
||||
if (requestedHelperThreadCount < 0)
|
||||
return js::GetCPUCount();
|
||||
if (requestedHelperThreadCount < 0) {
|
||||
unsigned ncpus = js::GetCPUCount();
|
||||
return ncpus == 1 ? 0 : ncpus;
|
||||
}
|
||||
return requestedHelperThreadCount;
|
||||
#else
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user