Registry / utility / nebulouslabs-demotemutex

nebulouslabs-demotemutex

JSON →
library0.0.0-20151003192217-235395f71c40gogounverified

Extension to sync.Mutex that allows a writelock to be demoted to a readlock without releasing control to other writelocks.

go get gitlab.com/NebulousLabs/demotemutex
INSTALL
IMPORT
SIG · NEBULOUSLABS-DEMOT
N
nebulouslabs-demotemutex
utilitygov0.0.0-20151003192217-235395f71c40
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

demotemutex
✓ gitlab.com/NebulousLabs/demotemutex

Demonstrates demoting a write lock to a read lock.

package main import ( "fmt" "gitlab.com/NebulousLabs/demotemutex" ) func main() { var mu demotemutex.DemoteMutex mu.Lock() // ... critical section ... mu.DemoteToReadLock() // ... read-only section ... mu.RUnlock() fmt.Println("Done") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20151003192217-235395f71c40latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
nebulouslabs-demotemutex — go get nebulouslabs-demotemutex · libregistry