-
Notifications
You must be signed in to change notification settings - Fork 8
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
Tasks spawned with tspawnat can migrate on 1.7 #32
Comments
Making So |
IMO, these opinions are particularly strong in the Julia community and, to some extent, understandable. But not every code is library code which needs to compose well with other library code / user code. It might just be a very particular application. I'm working in HPC and often you just need to know that a certain piece of code will run on a certain hardware thread (which you might have pinned to a specific core). And the only built-in way (that I'm aware of) is
I'd say |
That's a fair point. Will |
Using ThreadPools v2.1.0 and Julia v1.7.1, tasks spawned with
@tspawnat
can migrate between threads. Tasks spawned this way always spawn on the correct thread as given to the macro, but can migrate to another thread during execution.There is some existing work to add support for sticky tasks in 1.7+ in this PR JuliaLang/julia#42302 but it will not land for some time.
Are you interested in supporting sticky tasks in 1.7+ in this package? From my testing, it would be a simple change. Just allow the user to set
sticky
totrue
here: https://github.com/tro3/ThreadPools.jl/blob/master/src/macros.jl#L270cc @IanButterworth
The text was updated successfully, but these errors were encountered: