listen ctx for closing object
This commit is contained in:
parent
4c00dba1cf
commit
18451bd4fe
@ -176,9 +176,13 @@ Load:
|
|||||||
}
|
}
|
||||||
c.mu.Unlock()
|
c.mu.Unlock()
|
||||||
if closing {
|
if closing {
|
||||||
<-e.close
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return nil, ctx.Err()
|
||||||
|
case <-e.close:
|
||||||
goto Load
|
goto Load
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if load {
|
if load {
|
||||||
go c.load(ctx, id, e)
|
go c.load(ctx, id, e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user