Skip to content

Commit

Permalink
Add MacOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 30, 2020
1 parent fe3b5f0 commit bb93459
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 9 1 * *' # Runs at 09:00 UTC on the 1st of every month

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion ThreadPoolExecutorPlus/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pltfm = platform.system()
if pltfm == 'Windows':
DEFAULT_MAXIMUM_WORKER_NUM = (os.cpu_count() or 1) * 16
elif pltfm == 'Linux':
elif pltfm == 'Linux' or pltfm == 'Darwin':
DEFAULT_MAXIMUM_WORKER_NUM = (os.cpu_count() or 1) * 32
else:
raise RuntimeError("We havent decided how many threads should acquire on your platform. Maybe you have to modify source code your self.")
Expand Down
2 changes: 1 addition & 1 deletion extra/stress_testing.py → misc/stress_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def main():
scale_factor = 0.2
if pltfm == 'Windows':
max_workers = min((os.cpu_count() or 1) << 7 , 1024)
elif pltfm == 'Linux':
elif pltfm == 'Linux' or pltfm == 'Darwin':
max_workers = min((os.cpu_count() or 1) << 8 , 4096)
else:
raise RuntimeError('could only run on x86 platform')
Expand Down

0 comments on commit bb93459

Please sign in to comment.