> In that case, a solution, when using lazy sets together with
> the "numWaiters != 0" trick, is to only block for some time,
> then wake-up to re-check the boolean condition.
> For example, waiting (1 ns + 0.1 * ns elapsed since wait
> beginning), i.e. if first wait chunk takes 100 microseconds, next
> wait chunk will be targeted to wake up after 10 more microseconds.
Initially I'm going for a brutally simple workaround of:
processorNotifyCondition.await(1, MILLISECONDS);
Then look if any more complicated solution is necessary. Has no
impact on the microbenchmarks and running with a buffer size of 1 is a
fairly unusual case.
Mike