I decided to display a warning on using ThreadPinning on Windows and macOS as not informing the user at all that the package isn't going to work on these OSs doesn't seem right. The warning can be disabled by setting the preference os_warning=false. A helper function for this is ThreadPinning.Prefs.set_os_warning(false).
After using ThreadPinning, pinthreads and co will be no-ops (i.e. not show a warning!) on Windows and macOS.
As a package author that wants to specify a default pinning in a package, you can of course always load ThreadPinning conditionally if you don't like the warning, i.e. for example:
@static if Sys.islinux()
using ThreadPinning
pinthreads(:numa)
end
I decided to display a warning on
using ThreadPinning
on Windows and macOS as not informing the user at all that the package isn't going to work on these OSs doesn't seem right. The warning can be disabled by setting the preferenceos_warning=false
. A helper function for this isThreadPinning.Prefs.set_os_warning(false)
.After
using ThreadPinning
,pinthreads
and co will be no-ops (i.e. not show a warning!) on Windows and macOS.As a package author that wants to specify a default pinning in a package, you can of course always load ThreadPinning conditionally if you don't like the warning, i.e. for example:
(cc @oschulz)
Closes #78