[concurrency-interest] delaying in the nanosecond range

Peter Veentjer alarmnummer at gmail.com
Mon May 31 13:42:40 EDT 2010


Is there any way other than performing some arbitrary calculation (like
calculating pi) to enter 0..1000 ns delay range?

I'm working on an STM and I'm including support for a bug shaker by
inserting delays (delays are removed by the JIT if not enabled)
at strategic positions. A park nanos leads to at least a few thousand
nanoseconds delay and this causes new problems,
like transactions not being able to complete because there always is some
conflict.

Of course the result of calculation need to be 'used' to make sure that the
JIT doesn't compile the calculation away.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100531/2c6c21da/attachment.html>


More information about the Concurrency-interest mailing list