more-lambdas-java icon indicating copy to clipboard operation
more-lambdas-java copied to clipboard

fix setRate & setPeriod visibility problem

Open leoxiao2012 opened this issue 3 years ago • 0 comments

'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.

leoxiao2012 avatar Oct 18 '22 09:10 leoxiao2012