loop: Use RLock

This commit is contained in:
Hajime Hoshi 2016-08-30 23:56:34 +09:00
parent 53e1f90146
commit 57a32464dc

View File

@ -54,8 +54,8 @@ func (c *runContext) startRunning() {
}
func (c *runContext) isRunning() bool {
c.m.Lock()
defer c.m.Unlock()
c.m.RLock()
defer c.m.RUnlock()
return c.running
}