Package Usage: go: github.com/anacrolix/sync
Package sync is an extension of the stdlib "sync" package. It has extra
functionality that helps debug the use of synchronization primitives. The
package should be importable in place of "sync". The extra functionality
can be enabled by calling Enable() or passing a non-empty PPROF_SYNC
environment variable to the process.
Several profiles are exposed on the default HTTP muxer (and to
"/debug/pprof" when "net/http/pprof" is imported by the process).
"lockHolders" lists the stack traces of goroutines that called Mutex.Lock
that haven't subsequently been Unlocked. "lockBlockers" contains goroutines
that are waiting to obtain locks. "/debug/lockTimes" or PrintLockTimes()
shows the longest time a lock is held for each stack trace.
Note that currently RWMutex is treated like a Mutex when the package is
enabled.
8 versions
Latest release: almost 2 years ago
379 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/anacrolix/sync