MCPcopy Create free account
hub / github.com/assembla/cony / Cancel

Method Cancel

consumer.go:43–52  ·  view source on GitHub ↗

Cancel this consumer. This will CLOSE Deliveries() channel

()

Source from the content-addressed store, hash-verified

41//
42// This will CLOSE Deliveries() channel
43func (c *Consumer) Cancel() {
44 c.m.Lock()
45 defer c.m.Unlock()
46
47 if !c.dead {
48 close(c.deliveries)
49 close(c.stop)
50 c.dead = true
51 }
52}
53
54func (c *Consumer) reportErr(err error) bool {
55 if err != nil {

Calls

no outgoing calls