mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
s/CondClosed/ErrCondClosed/
This commit is contained in:
parent
64433ec674
commit
afe0a90487
1 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
)
|
||||
|
||||
var CondClosed = errors.New("condition closed")
|
||||
var ErrCondClosed = errors.New("condition closed")
|
||||
|
||||
// Cond implements a condition variable, a rendezvous point
|
||||
// for goroutines waiting for or announcing the occurrence
|
||||
|
|
@ -64,7 +64,7 @@ func (c *Cond) Wait() <-chan struct{} {
|
|||
case l := <-c.listeners:
|
||||
return l
|
||||
case <-c.ctx.Done():
|
||||
panic(CondClosed)
|
||||
panic(ErrCondClosed)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ func (c *Cond) Broadcast() {
|
|||
select {
|
||||
case c.broadcast <- struct{}{}:
|
||||
case <-c.ctx.Done():
|
||||
panic(CondClosed)
|
||||
panic(ErrCondClosed)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue