On 2/14/18 1:58 AM, Peter Levart wrote:
I take back this claim. Of course the the following race is possible:
- Thread1: calls runAllFinalizers and takes a Finalizer from
- Thread2: takee the same Finalizer instance from ReferenceQueue and
- Thread1: calls runFinalizer() with the same instance for the 2nd
runAllFinalizers is invoked during shutdown when
System.runFinalizersOnExit has been called.
I have been wanting to remove System::runFinalizersOnExit  which is
the culprit of causing this complicated handling. Probably time to
remove it in 11?