mirror of
https://github.com/9001/copyparty.git
synced 2025-10-03 09:49:29 +02:00
accurate num.cores detection
This commit is contained in:
parent
27f08cdbfa
commit
5d19f23372
5 changed files with 16 additions and 9 deletions
|
@ -929,7 +929,7 @@ def main():
|
|||
if not VT100:
|
||||
os.system("rem") # enables colors
|
||||
|
||||
cores = os.cpu_count() if hasattr(os, "cpu_count") else 4
|
||||
cores = (os.cpu_count() if hasattr(os, "cpu_count") else 0) or 2
|
||||
hcores = min(cores, 3) # 4% faster than 4+ on py3.9 @ r5-4500U
|
||||
|
||||
# fmt: off
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue