MCPcopy
hub / github.com/junegunn/fzf / Wait

Method Wait

src/util/eventbox.go:27–36  ·  view source on GitHub ↗

Wait blocks the goroutine until signaled

(callback func(*Events))

Source from the content-addressed store, hash-verified

25
26// Wait blocks the goroutine until signaled
27func (b *EventBox) Wait(callback func(*Events)) {
28 b.cond.L.Lock()
29
30 if len(b.events) == 0 {
31 b.cond.Wait()
32 }
33
34 callback(&b.events)
35 b.cond.L.Unlock()
36}
37
38// Set turns on the event type on the box
39func (b *EventBox) Set(event EventType, value any) {

Callers 13

TestReadFromCommandFunction · 0.95
RunFunction · 0.95
TestEventBoxFunction · 0.95
WaitForMethod · 0.95
LoopMethod · 0.80
scanMethod · 0.80
withOutputPipeFunction · 0.80
withInputPipeFunction · 0.80
readFromCommandMethod · 0.80
captureAsyncMethod · 0.80
executeCommandMethod · 0.80
LoopMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestReadFromCommandFunction · 0.76
TestEventBoxFunction · 0.76