issues
search
minio
/
dsync
A distributed sync package.
Apache License 2.0
400
stars
41
forks
source link
Making DRWMutex compatible with sync.rwmutex again and more
#18
Closed
fwessels
closed
8 years ago
fwessels
commented
8 years ago
drwmutex.go / drwmutex_test.go:
DRWMutex made compatible with sync.rwmutex (via writeLocks & readersLocks arrays) so it now allows multiple RLocks() to be done on the same object
Refactor out common code for Lock/RLock and Unlock/RUnlock
Added full test harness from sync.rwmutex
Added benchmarks from sync.rwmutex
Unlock()/RUnlock() on unlocked object will panic (conform sync.rwmutex)
dsync_test.go:
Use simple int64 instead of []bool for DRWMutex book keeping (map[string]int64 instead of map[string][]bool)
other changes:
Updated README.md (still WIP)
drwmutex.go / drwmutex_test.go:
dsync_test.go:
other changes: