Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow finalizers to take any locks and yield during exit (#51848)
This aligns their behavior with manual calls to `finalize(o)`, and prepares for a future time in which these functions are always run on a separate thread. This means that they can wait to acquire locks in this context, which otherwise would have been denied to them. (cherry picked from commit c54a3f2)