mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-16 09:15:37 +01:00
...
This commit is contained in:
parent
6ca56ccdcf
commit
efc4f7bb8d
1 changed files with 2 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ class SYSTEM_INFO(Structure):
|
|||
gsi.restype = None
|
||||
si = SYSTEM_INFO()
|
||||
gsi(si)
|
||||
cpu_count = min(16, max(1, si.dwNumberOfProcessors))
|
||||
cpu_count = si.dwNumberOfProcessors
|
||||
else:
|
||||
from multiprocessing import cpu_count
|
||||
try:
|
||||
|
|
@ -42,6 +42,7 @@ class SYSTEM_INFO(Structure):
|
|||
except NotImplementedError:
|
||||
cpu_count = 1
|
||||
|
||||
cpu_count = min(16, max(1, cpu_count))
|
||||
|
||||
def run_worker(job, decorate=True):
|
||||
cmd, human_text = job
|
||||
|
|
|
|||
Loading…
Reference in a new issue