RFR: 8200697: Add utility for spin wait with fallback to yield/sleep (original) (raw)

Kim Barrett kim.barrett at oracle.com
Sat Apr 7 19:54:41 UTC 2018


On Apr 4, 2018, at 7:42 PM, David Holmes <david.holmes at oracle.com> wrote:

Hi Kim, If this works you for then by all means use it.

Thanks.

Whether it is useful as a general utility is something I am doubtful of. Degrading spin-loops are put in for performance reasons and generally have to interact with surrounding code that captures exactly what is being waited upon. There is also the issue of thread-state transitions that need to be carefully managed.

Agreed that this is of limited use. But since Robbin and I came up with similar approaches, and both were based on examples already in HotSpot, we decided to package it up.



More information about the hotspot-dev mailing list