[2423] in java-interest

home help back first fref pref prev next nref lref last post

Re: Loosing the user thread.

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Sun Oct 1 16:34:11 1995

Date: Sun, 1 Oct 1995 11:40:04 -0700
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: david@threewiz.demon.co.uk
Cc: java-interest@java.Eng.Sun.COM


Hi David,

> My understanding of threads is that all user threads will run to 
> completion before the interpreter exits.  

True, unless they are daemon threads.

> I don't see this happening,
> in fact, unless my main thread does an explicit yield the user thread 
> (and I confirmed this by printing:
> 
> 	System.out.print("is daemon?"
> 		+ Thread.currentThread().isDaemon() + "\n");
> 
> Which yields false)
> 
> Never gets run.
> 
> The user thread waits accepting socket connections, so when it goes to 
> sleep waiting for some business the main thread gets reawoken and I have 
> to yield once again to get the user thread running.
> 
> Would anyone care to explain to me what is happening,

Can you send me a simplified example? It sounds like there is something
else going on that is confusing you.

Have fun,

	Arthur van Hoff
	
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post