Re: Thread priorities don't work with native threads

2000-05-01 Thread Nathan Meyers
On Sat, Jun 07, 2036 at 07:48:37PM -0700, Joseph Shraibman wrote: > Run the following with green threads and you get only H's. Run it with native > threads and you get H's mixed with L's The native threading mechanism on Linux doesn't offer many thread priority choices (run "man pthread_attr_ini

Re: Thread priorities don't work with native threads

2000-05-01 Thread John R MacMillan
I think you could rephrase that as "In Java, Thread priorities don't work". :-) The language guarantees about thread priorities are probably weaker than you expect. Quoth the language spec: "Every thread has a priority. When there is competition for processing resources, threads with higher prior

Re: Thread priorities don't work with native threads

2000-05-01 Thread Juergen Kreileder
This is perfectly legal with respect to the JLS. LinuxThreads only allows thread priorities for the scheduling policies SCHED_RR, SCHED_FIFO, both policies would require superuser privileges and are not what you really want to have for Java threads. Joseph> Run the following with green thre

Re: Thread priorities don't work with native threads

2000-05-01 Thread Nelson Minar
Thread priorities don't work in any JVM I've used. Java's rules are fairly senseless, too. I'm not sure your case qualifies as a bug, though: > public void run(){ > //Thread.yield(); > while(true){ > System.out.print(name); > System.out.flush

Thread priorities don't work with native threads

2000-05-01 Thread Joseph Shraibman
Run the following with green threads and you get only H's. Run it with native threads and you get H's mixed with L's /** * threadtest.java * * * Created: Mon May 1 15:35:45 2000 * * @author Joseph Shraibman * @version 1.0 */ public class threadtest { public threadtest() {}