On 10/24/06, Salikh Zakirov <[EMAIL PROTECTED]> wrote:

Yes, the lock is global. I used try_enter() to prevent possible deadlock
scenario,
when the finalization happens at precisely the moment finalization thread
is holding
the finalization lock. If this happens, and vm_hint_finalize() cannot grab
the finalization monitor, no harm is taken, because locked finalization
monitor
means that the finalization thread is active, and does not need to be
waked up.


+1  to Salikh's solution. Why should we call Java from vm-helpers to run
finalization threads when all we need could be done in native code safely:
just check monitor and call "notify" if needed.


--
Mikhail Fursov

Reply via email to