Add sync.NewCond

Required by net/http.
This commit is contained in:
Federico G. Schwindt
2021-05-28 16:58:00 +01:00
committed by Ayke
parent 2f248bbf8b
commit 5b82125765
+4
View File
@@ -16,6 +16,10 @@ type earlySignal struct {
signaled bool
}
func NewCond(l Locker) *Cond {
return &Cond{L: l}
}
func (c *Cond) trySignal() bool {
// Pop a blocked task off of the stack, and schedule it if applicable.
t := c.blocked.Pop()