[225] in java-interest

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

Re: Threads vs New White Paper

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Wed Jun 7 20:31:08 1995

Date: Wed, 7 Jun 1995 17:27:22 -0700
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: johnm@medicus.com
Cc: java-interest@java.Eng.Sun.COM


Hi John,

> So, my question becomes: what then is the *real* specification of the
> thread support in Java?  I.e., if I as a developer cannot count on
> preemptive threading then I end up having to explicitly do all of that
> yield() calling crap.  That's no better than not having thread support
> in the language.

The underlying implementation is guaranteed to be preemtive. On platforms
that do not support thread preemtion (like the Mac), we'll make sure that
the thread is rescheduled on the next opportunity. In our Mac port we
check for this on every branch and method call. This "poor-mans" preemtion
provides you with similar semantics as true preemption.

Note that as Jon pointed out, threads of the same priority currently
don't preemt each other. This may change in the future. It is likely
that a native solaris thread implementation of our threads will even
do time-slicing between various threads.

Have fun,

	Arthur van Hoff (avh@eng.sun.com)
	http://java.sun.com/people/avh/
	Sun Microsystems Inc, M/S UPAL02-301,
	100 Hamilton Avenue, Palo Alto CA 94301, USA
	Tel: +1 415 473 7242, Fax: +1 415 473 7104
 
-
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