MCPcopy Create free account
hub / github.com/encodeous/nylon / Stop

Method Stop

core/nylon.go:263–273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261}
262
263func (n *Nylon) Stop() {
264 n.cleanupOnce.Do(func() {
265 n.Cancel(context.Canceled)
266 if n.Context.Err() == nil {
267 select {
268 case n.DispatchChannel <- nil: // instead of close(), which can cause a data race
269 case <-n.Context.Done():
270 }
271 }
272 })
273}
274
275func (n *Nylon) mainLoop() error {
276 n.Log.Debug("started main loop")

Callers 1

mainLoopMethod · 0.95

Calls 1

CancelMethod · 0.45

Tested by

no test coverage detected