mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
...
This commit is contained in:
parent
6ca56ccdcf
commit
efc4f7bb8d
@ -34,7 +34,7 @@ if iswindows:
|
|||||||
gsi.restype = None
|
gsi.restype = None
|
||||||
si = SYSTEM_INFO()
|
si = SYSTEM_INFO()
|
||||||
gsi(si)
|
gsi(si)
|
||||||
cpu_count = min(16, max(1, si.dwNumberOfProcessors))
|
cpu_count = si.dwNumberOfProcessors
|
||||||
else:
|
else:
|
||||||
from multiprocessing import cpu_count
|
from multiprocessing import cpu_count
|
||||||
try:
|
try:
|
||||||
@ -42,6 +42,7 @@ else:
|
|||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
cpu_count = 1
|
cpu_count = 1
|
||||||
|
|
||||||
|
cpu_count = min(16, max(1, cpu_count))
|
||||||
|
|
||||||
def run_worker(job, decorate=True):
|
def run_worker(job, decorate=True):
|
||||||
cmd, human_text = job
|
cmd, human_text = job
|
||||||
|
Loading…
x
Reference in New Issue
Block a user