-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
run finalizers on their own thread #35689
Comments
Had to work around that recently, by disabling finalizers when taking a lock that might also be taken during finalizers: JuliaGPU/CuArrays.jl@2258a24 |
Relatedly, I think we should consider renaming |
@vtjnash . It would be nice to have the option of preventing finalizers from running concunrently. |
Following the test-test-set pattern in the manual helped seems to help resolve an issue we had with HDF5.jl when working with finalizers and locks: https://docs.julialang.org/en/v1/manual/multi-threading/#Safe-use-of-Finalizers |
In general, finalizers may need to acquire locks, so they should be guaranteed to run on a separate thread to avoid conflicts with the main execution threads. @vtjnash may be able to provide some more details.
The text was updated successfully, but these errors were encountered: