Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 9.8% on proxy.golang.org

proxy.golang.org : github.com/neilotoole/fifomu

Package fifomu provides a Mutex whose Lock method returns the lock to callers in FIFO call order. This is in contrast to sync.Mutex, where a single goroutine can repeatedly lock and unlock and relock the mutex without handing off to other lock waiter goroutines (that is, until after a 1ms starvation threshold, at which point sync.Mutex enters a FIFO "starvation mode" for those starved waiters, but that's too late for some use cases). fifomu.Mutex implements the exported methods of sync.Mutex and thus is a drop-in replacement (and by extension also implements sync.Locker). It also provides a bonus context-aware Mutex.LockContext method. Note: unless you need the FIFO behavior, you should prefer sync.Mutex. For typical workloads, its "greedy-relock" behavior requires less goroutine switching and yields better performance.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/neilotoole/fifomu
Keywords: acquisition, fifo, go, golang, lock, locking, mutex, queue, sync
License: MIT
Latest release: 5 months ago
First release: 5 months ago
Namespace: github.com/neilotoole
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 24 days ago

    Loading...
    Readme
    Loading...