Skip to content

Read Write Mutex for Go enables TryLock and TryRLock

License

Notifications You must be signed in to change notification settings

kawasin73/trwmutex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Try Read Write Mutex for Go

Extended sync.RWMutex which have TryLock() and TryRLock().

Use sync.Mutex and sync.RWMutex internally, not channel.

Of course TryLock() TryRLock() never blocks so long.

trwmutex.TRWMutex can be used as sync.RWMutex with same interface.

How to use

go get github.com/kawasin73/trwmutex

API

  • Lock()
  • TryLock() -> bool
  • Unlock()
  • RLock()
  • TryRLock() -> bool
  • RUnlock()

LICENSE

MIT

About

Read Write Mutex for Go enables TryLock and TryRLock

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages