This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hai, Even I dont know much about it ,So excuse me if this information is wrong. What I know about the green threads are like they are used by the jvm and not mapped on to multiple operating system and it does not support native methods.
------------------ Sandeep Jain
Try and Try Till u succeed<br /> <br />Sandeep Jain
William, I'm not Thread expert, but I've done a bit of Thread programming. My understanding of the main 'how does it affect me' aspect of the difference is that 'green' threads don't support time-slicing - the thread runs until its done or until it encounters yield() or sleep(), so if you have a loop, for instance, you're well advised to put yield or sleep in your loop if you want other threads to have a chance to do things. Otherwise the thread executing the loop in a green threads envoronment acts selfishly and hogs the processor. I'm only aware of this being a problem in the 1.x implementation of the JVM on Solaris (not sure if/how other Unix or Linux systems are affected). The newer 'native' threads on Solaris are supposed to support time-slicing (or some other scheme that prevents selfish threads from hogging things). This isn't a real problem on NT, as NT uses time-slicing anyway. Jim