Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/deepzoom: parallelize deepzoom_tile to available CPUs #297

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

bgilbert
Copy link
Member

On Python 3.13+, and on all Python versions on Linux, set the default job count to the number of available CPUs. Otherwise, default to 4 jobs as before.

Also: if OpenSlide Python is type-checked on Windows, os.add_dll_directory() will exist and mypy will complain. Add an extra ignore to fix this. Mypy understands conditionalizing on sys.platform but not on os.name, and we want the latter because it exactly corresponds to whether the function exists.

If OpenSlide Python is type-checked on Windows, os.add_dll_directory()
will exist and mypy will complain.  Add an extra ignore to fix this.  Mypy
understands conditionalizing on sys.platform but not on os.name, and we
want the latter because it exactly corresponds to whether the function
exists.

Signed-off-by: Benjamin Gilbert <[email protected]>
On Python 3.13+, and on all Python versions on Linux, set the default job
count to the number of available CPUs.  Otherwise, default to 4 jobs as
before.

Signed-off-by: Benjamin Gilbert <[email protected]>
@openslide-bot
Copy link
Member

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@bgilbert bgilbert merged commit d2961cf into openslide:main Oct 28, 2024
52 checks passed
@bgilbert bgilbert deleted the cpu-count branch October 28, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants