MCPcopy
hub / github.com/loong/go-concurrency-exercises / fetchSignalInstance

Function fetchSignalInstance

0-limit-crawler/mockfetcher.go:71–77  ·  view source on GitHub ↗

fetchSignalInstance is a singleton to access fetchSignal

()

Source from the content-addressed store, hash-verified

69
70// fetchSignalInstance is a singleton to access fetchSignal
71func fetchSignalInstance() chan bool {
72 if fetchSignal == nil {
73 // Use buffered channel to avoid blocking
74 fetchSignal = make(chan bool, 1000)
75 }
76 return fetchSignal
77}

Callers 2

TestMainFunction · 0.85
FetchMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestMainFunction · 0.68