Program control using threads in Java should be controlled by blocking and notifying. Read "Effective Java Programming Language Guide" by Joshua Block for some good tips on how to use threads correctly in Java. Claiming laziness on this issue will eventually get you into trouble if the project is big enough.
[EMAIL PROTECTED] wrote:
--On Thu, 6 Feb 2003, Hui Huang wrote:They don't really want to be kicked out of CPU. But you have to have those yield()'s inserted into a program because otherwise
I think we've lost a little context here. This started out when I said that instead of not doing anything Thread.yield() could be implemented as sleep(1).
That being said, by default Sun's JDK converts Thread.yield() directly to sched_yield() on Linux.
Last time it came up on the list the conclusion was that Thread.yield() wasn't implemented to do anything. Maybe that's changed.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Matthew Avery
Senior Developer
(513) 470-5316
http://www.einnovation.com/
eInnovation, Inc., located in the heart of the midwest, invents and promotes eBusiness software that moves business technology to open standards.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]