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 threads and you get only H's.
    Joseph> Run it with native threads and you get H's mixed with L's

Don't use thread priorities for synchronization!  They are completely
different concepts.  Even with thread priorities implemented your test
would fail badly on multi processor machines.
If you need a specific execution order then add synchronization!


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
JVM'01: http://www.usenix.org/events/jvm01/


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to