Skip to content

Commit bb93459

Browse files
author
=
committed
Add MacOS support
1 parent fe3b5f0 commit bb93459

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
branches: [ main ]
99
pull_request:
1010
branches: [ main ]
11+
schedule:
12+
- cron: '0 9 1 * *' # Runs at 09:00 UTC on the 1st of every month
1113

1214
jobs:
1315
build:

ThreadPoolExecutorPlus/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
pltfm = platform.system()
1919
if pltfm == 'Windows':
2020
DEFAULT_MAXIMUM_WORKER_NUM = (os.cpu_count() or 1) * 16
21-
elif pltfm == 'Linux':
21+
elif pltfm == 'Linux' or pltfm == 'Darwin':
2222
DEFAULT_MAXIMUM_WORKER_NUM = (os.cpu_count() or 1) * 32
2323
else:
2424
raise RuntimeError("We havent decided how many threads should acquire on your platform. Maybe you have to modify source code your self.")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def main():
4040
scale_factor = 0.2
4141
if pltfm == 'Windows':
4242
max_workers = min((os.cpu_count() or 1) << 7 , 1024)
43-
elif pltfm == 'Linux':
43+
elif pltfm == 'Linux' or pltfm == 'Darwin':
4444
max_workers = min((os.cpu_count() or 1) << 8 , 4096)
4545
else:
4646
raise RuntimeError('could only run on x86 platform')

0 commit comments

Comments
 (0)