> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Subject: Re: Multi processor issue
> 
> Thread.yield() will also work. It's unclear which is better from the
> API, but I would imagine that a VM implementor would write the
> Thread.yield method such that any remaining CPU time is yielded
> immediately, whereas you would have to guess at the amount of "sleep"
> time to use (but I'm sure something like 500ms would be just fine, as
> CPU time slices are pretty small).

Thread.yield() would be much, much more efficient than a sleep() call,
both in terms of OS internal operations and response time back to the
client.  Neither has anything to do with the time slice.  However, I
don't think either one is really necessary in this exercise.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to