Re:Things you didn't know about multithreaded programming
by davidw on Tuesday November 09, 2010 @09:38AM
(#1886521)
Oh - I wasn't aware of that. Are there any of the main implementations where they aren't?
Re:Things you didn't know about multithreaded programming
by mzl on Tuesday November 09, 2010 @10:03AM
(#1886613)
It is possible to manage it manually using Executors. Take a look at thread pools in http://download.oracle.com/javase/tutorial/essential/concurr... for an overview look at what to do.
I hope that it works better than the last time I tried, since I will probably have to write some multi-threaded Java code quite soon :)
Re:Things you didn't know about multithreaded programming
by lemming on Tuesday November 09, 2010 @10:27AM
(#1886686)
This is a little misleading. It may be true that the Java specification doesn't require Java threads to map onto system threads but for all intents and purposes they're the same in all real implementations. The Executor framework doesn't change this, it gives you a flexible framework for task scheduling using thread pools.
Re:Things you didn't know about multithreaded programming
by mzl on Tuesday November 09, 2010 @05:02PM
(#1888119)
A lot of my earlier work was in formal specification of JVM thread behaviour, so I was very interested in what the standard said and required. I agree that in practice, it probably will map to threads, which is unfortunate. The experiments were mostly to satisfy my curiosity on how stuff behaved in the real world.
Re:Things you didn't know about multithreaded programming
by wmf on Tuesday November 09, 2010 @04:36PM
(#1888018)
Back in the dark ages the Sun JVM used green threads. More recently, JRockit added "thin threads" to win VolanoMark. http://download.oracle.com/docs/cd/E13222_01/wls/docs81b/jro...
AFAIK, Java threads are not required to map directly onto system threads.