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

Question: Recommended way to add to package that could run on Windows #92

Closed
ejmeitz opened this issue Feb 2, 2024 · 1 comment
Closed

Comments

@ejmeitz
Copy link

ejmeitz commented Feb 2, 2024

Is there a recommended way to only load and pin threads if my package is loaded by someone using Linux? e.g. If my package is loaded on Windows nothing bad should happen.

@carstenbauer
Copy link
Owner

carstenbauer commented Feb 2, 2024

Hi @ejmeitz, there shouldn't be anything you need to do. That is, by default, nothing bad should happen on Windows 😉

On Windows:

using ThreadPinning # will throw a informative warning, see https://github.com/carstenbauer/ThreadPinning.jl/blob/599835342ce509d6fd35a17d4b49cedfa0c6ccd8/src/ThreadPinning.jl#L93-L95
pinthreads(:cores) # will be a no-op

If you observe something different, or have any suggestions on how it should behave differently, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants