Closed tsuna closed 8 years ago
I can see two possible stances here:
fakeClock
RWMutex
Mutex
Now()
RLock()
RUnlock()
I initially went with approach 1, somehow changed my mind for 2, but could be convinced either way.
Good spot. This is definitely my preferred approach. Thanks for the patch!
I can see two possible stances here:
fakeClock
non-performance sensitive test code, in which case we might just turn theRWMutex
into a plainMutex
.RWMutex
so that multiple callers can callNow()
with less friction, in which case we should useRLock()
/RUnlock()
.I initially went with approach 1, somehow changed my mind for 2, but could be convinced either way.