You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GC queues finalizers, and it sets a flag in the VM of the sweeping thread. Once the thread resumes VM loop, it calls GC_invoke_finalizers() in a safe position, which processes the pending finalizers.
However, if the thread is terminated by another thread before that, the flag is never checked and the queued finalizers won't run.
Using a global flag involves high overhead (even lock-free check is costlier than localized memory reference).
The text was updated successfully, but these errors were encountered:
GC queues finalizers, and it sets a flag in the VM of the sweeping thread. Once the thread resumes VM loop, it calls
GC_invoke_finalizers()
in a safe position, which processes the pending finalizers.However, if the thread is terminated by another thread before that, the flag is never checked and the queued finalizers won't run.
Using a global flag involves high overhead (even lock-free check is costlier than localized memory reference).
The text was updated successfully, but these errors were encountered: