Close closes the ticker channel and prevents further ticks.
()
| 69 | |
| 70 | // Close closes the ticker channel and prevents further ticks. |
| 71 | func (t *Cond) Close() { |
| 72 | t.closeOnce.Do(func() { |
| 73 | t.mu.Lock() |
| 74 | defer t.mu.Unlock() |
| 75 | |
| 76 | if t.ch != nil { |
| 77 | close(t.ch) |
| 78 | t.ch = nil |
| 79 | } |
| 80 | }) |
| 81 | } |
nothing calls this directly
no outgoing calls
no test coverage detected