[cp-patches] FYI: Handle thread state

Andrew John Hughes gnu_andrew at member.fsf.org
Thu Jun 29 20:45:27 UTC 2006


On Wed, 2006-06-28 at 21:07 +0100, Andrew John Hughes wrote:
> This patch puts a bit more into thread state handling.
> It adds a variable to hold the state inside the thread
> (in much the same way as the name is handled).  It also
> updates some of the methods so that they also update the
> state.  A full implementation will mean that VMs also have
> to update the state when it changes in native code.  Note
> that we only look at the state from a VM perspective, not
> from an OS one.  So, state changes in native code will be
> monitor lock acquisition, wait, notify and the expiration
> of sleep and join.
> 
> (And yes, using a String is ugly... roll on the merge!)
> 
> Changelog:
> 
> 2006-06-28  Andrew John Hughes  <gnu_andrew at member.fsf.org>
> 
> 	* java/lang/Thread.java:
> 	(Thread(ThreadGroup,Runnable,String,long)): Update
> 	state.
> 	(Thread(VMThread,String,int,boolean)): Likewise.
> 	(join(long,int)): Likewise.
> 	(resume()): Likewise.
> 	(sleep(long,int)): Likewise.
> 	(start()): Likewise.
> 	(stop()): Likewise.
> 	(suspend()): Likewise.
> 	(die()): Likewise.
> 	(getState()): Return either state or use VMThread.
> 	* java/lang/VMThread.java:
> 	(getState()): Added default implementation to return
> 	thread.state
> 

Reverted.
-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060629/5de5e8e5/attachment.pgp


More information about the Classpath-patches mailing list