harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: svn commit: r506286 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Date Fri, 16 Feb 2007 13:10:24 GMT
Geir Magnusson Jr. wrote:
> Just curious - is it harmful to call VMThreadManager.stop() if the
> thread isn't alive?

Currently, calling VMThreadManager.stop() will do no harm,
(it just sets a callback in a thread block)
as DRLVM's hythr.dll allocates native thread block when Thread object is
created, and never actually frees thread block.
Instead, the thread block might be reused later after Thread object
became unreachable.

If memory management of thread block ever becomes explicit
(i.e. allocate thread block on Thread.start() and release it just before thread
terminates), then doing anything with thread block without making sure
that the thread is still alive may cause crashes.

View raw message