-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dong,

JiaDong Huang wrote:
> Yes. Before and maybe within the loop. That should get the MT issue
> reproduced much easier.

This was a great idea, by the way.

>> What do you mean by yelding the CPU (sorry I'm French) ?
> 
> Yielding the CPU means to let your thread give up the CPU so as to give the
> others thread a change to run. The delay call Thread.sleep() should yield
> the CPU.

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).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfsBF9CaO5/Lv0PARAmKlAKCG7ABMw3INZLWyTwpV5wwc9X2OxACggk+z
zlUGR1XVADFUDeRSloRIbq4=
=lb4L
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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