mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
Add sync.NewCond
Required by net/http.
This commit is contained in:
committed by
Ayke
parent
2f248bbf8b
commit
5b82125765
@@ -16,6 +16,10 @@ type earlySignal struct {
|
|||||||
signaled bool
|
signaled bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewCond(l Locker) *Cond {
|
||||||
|
return &Cond{L: l}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Cond) trySignal() bool {
|
func (c *Cond) trySignal() bool {
|
||||||
// Pop a blocked task off of the stack, and schedule it if applicable.
|
// Pop a blocked task off of the stack, and schedule it if applicable.
|
||||||
t := c.blocked.Pop()
|
t := c.blocked.Pop()
|
||||||
|
|||||||
Reference in New Issue
Block a user