more-lambdas-java
more-lambdas-java copied to clipboard
fix setRate & setPeriod visibility problem
'setRate' & 'setPeriod' only changed non-volatile variable 'allowTimesPerNanos' which might be invisible to other threads. (it didn't pass the newly added tests. Writing volatile 'lastAcquiredNanos' to zero will fix it.