MCPcopy
hub / github.com/cloudflare/cloudflared / Notify

Method Notify

signal/safe_signal.go:23–27  ·  view source on GitHub ↗

Notify alerts any goroutines waiting on this signal that the event has occurred. After the first call to Notify(), future calls are no-op.

()

Source from the content-addressed store, hash-verified

21// Notify alerts any goroutines waiting on this signal that the event has occurred.
22// After the first call to Notify(), future calls are no-op.
23func (s *Signal) Notify() {
24 s.once.Do(func() {
25 close(s.ch)
26 })
27}
28
29// Wait returns a channel which will be written to when Notify() is called for the first time.
30// This channel will never be written to a second time.

Callers 5

ServeMethod · 0.80
TestWaitFunction · 0.80
RunFunction · 0.80
waitForSignalFunction · 0.80

Calls 1

DoMethod · 0.45

Tested by 2

TestWaitFunction · 0.64