README ¶ rwumutex Upgradeable RWMutex written in Go. I made this to build a toy DBMS with no-wait. rwuMutex's state n : n read lock 0 : no lock -1 : write lock API - GetState() int32 - TryLock() bool - TryRLock() bool - Unlock() - RUnlock() - TryUpgrade() bool LICENSE MIT Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Constants type RWUMutex func (mu *RWUMutex) GetState() int32 func (mu *RWUMutex) RUnlock() func (mu *RWUMutex) TryLock() bool func (mu *RWUMutex) TryRLock() bool func (mu *RWUMutex) TryUpgrade() bool func (mu *RWUMutex) Unlock() Constants ¶ View Source const ( WriterExist = -1 NotExist = 0 ) Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type RWUMutex ¶ type RWUMutex struct { // contains filtered or unexported fields } func (*RWUMutex) GetState ¶ func (mu *RWUMutex) GetState() int32 func (*RWUMutex) RUnlock ¶ func (mu *RWUMutex) RUnlock() func (*RWUMutex) TryLock ¶ func (mu *RWUMutex) TryLock() bool func (*RWUMutex) TryRLock ¶ func (mu *RWUMutex) TryRLock() bool func (*RWUMutex) TryUpgrade ¶ func (mu *RWUMutex) TryUpgrade() bool func (*RWUMutex) Unlock ¶ func (mu *RWUMutex) Unlock() Source Files ¶ View all Source files rwumutex.go Click to show internal directories. Click to hide internal directories.