[5234] in java-interest

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

threads move in mysterious ways

daemon@ATHENA.MIT.EDU (Andruid Kerne)
Fri Feb 2 20:36:45 1996

Date: Fri, 2 Feb 96 19:15:15 EST
From: andruid@SLINKY.CS.NYU.EDU (Andruid Kerne)
To: java-interest@java.sun.com
In-Reply-To: <199602020201.SAA00598@java0.javasoft.com> (owner-java-interest-digest@java.sun.com)

>>>
Subject: Can you write a selfish thread that does graphics?

I tried to write a graphical version of the "selfish thread" program in the 
Java tutorial, where the selfish thread doesn't call sleep() but waits in a 
loop, then repaints itself, then goes back to a busy loop, all 1000 times.

This is on Solaris where the text-based "selfish thread" program clearly 
shows that the selfish thread doesn't give up control once it is running.

But in graphics mode it wasn't all that selfish--it time sliced just fine.

Hence my question: Does a call to one of the graphics routines
(in my case g.fillOval(...)) give another thread a chance to butt in? Is 
that well-defined or just an artifact of the Solaris implementation?
>>>
in fact, quite a bit abou threads is not clearly documented, or not
documented at all.  behaviours do not seem to be identical from
Appletviewer to Netscape, and from platform to platform.  my
intuition, maybe someone who *knows* will confirm or deny, is that
this lack of documentation is a "cover" for software that is in a
state of flux on many levels.  have you noticed that there is *NO*
netscape documentation about their Java implementation.  as if it
works just like Sun's :-)!
-- 
Regards,

Andruid Kerne
NYU Media Research Laboratory
	--and also--
   Creative Media Cauldron

http://c4dm.nyu.edu/andruid/

The distinctions between artists and engineers -- between content
developers and programmers -- are entirely artificial.  
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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