MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / NewLatch

Function NewLatch

asyncbuffer/latch.go:14–16  ·  view source on GitHub ↗

NewLatch creates a new Latch.

()

Source from the content-addressed store, hash-verified

12
13// NewLatch creates a new Latch.
14func NewLatch() *Latch {
15 return &Latch{done: make(chan struct{})}
16}
17
18// Release releases the latch, allowing all waiting goroutines to proceed.
19func (g *Latch) Release() {

Callers 7

TestNewLatchFunction · 0.92
TestLatchReleaseFunction · 0.92
TestLatchWaitFunction · 0.92
TestLatchMultipleWaitersFunction · 0.92
NewFunction · 0.85
NewReadFullFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestNewLatchFunction · 0.74
TestLatchReleaseFunction · 0.74
TestLatchWaitFunction · 0.74
TestLatchMultipleWaitersFunction · 0.74