On 12/01/2015 05:36 AM, Paul Sandoz wrote:
On 1 Dec 2015, at 03:58, Gil Tene <g...@azul.com> wrote:
class Runtime { /...
/**
* Method signifying that the caller is momentarily unable to
* progress until the occurrence of one or more actions of one or
* more other activities. When invoked within each iteration, this
* method typically improves performance of spin wait loop
* constructions.
*/
public static void onSpinWait() {};
}
Short and sweet. I like it. I think it would be useful to add an @apiNote with
explanatory text similar to that in the motivation section of the JEP.
Or maybe not. Recent experience suggests that it is hard to add a brief
explanatory note or usage guidance without saying something
confusing or wrong wrt usages focussing on latency, throughput,
or power -- these effects may vary across processors with
different instructions (possibly just no-op) used to implement it.
Not a lot, but this accounts for the bland wording of
"typically improves performance".
-Doug