engine: graph: Set closed flag when resume signal closes
We had this backwards. Woops...
This commit is contained in:
@@ -459,7 +459,10 @@ Loop:
|
|||||||
|
|
||||||
// we are paused now, and waiting for resume or exit...
|
// we are paused now, and waiting for resume or exit...
|
||||||
select {
|
select {
|
||||||
case _, closed = <-obj.state[vertex].resumeSignal: // channel closes
|
case _, ok := <-obj.state[vertex].resumeSignal: // channel closes
|
||||||
|
if !ok {
|
||||||
|
closed = true
|
||||||
|
}
|
||||||
// resumed!
|
// resumed!
|
||||||
// pass through to allow a Process to try to run
|
// pass through to allow a Process to try to run
|
||||||
// TODO: consider adding this fast pause here...
|
// TODO: consider adding this fast pause here...
|
||||||
@@ -525,7 +528,10 @@ Loop:
|
|||||||
break LimitWait
|
break LimitWait
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case _, closed = <-obj.state[vertex].resumeSignal: // channel closes
|
case _, ok := <-obj.state[vertex].resumeSignal: // channel closes
|
||||||
|
if !ok {
|
||||||
|
closed = true
|
||||||
|
}
|
||||||
// resumed!
|
// resumed!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -581,7 +587,10 @@ Loop:
|
|||||||
break RetryWait
|
break RetryWait
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case _, closed = <-obj.state[vertex].resumeSignal: // channel closes
|
case _, ok := <-obj.state[vertex].resumeSignal: // channel closes
|
||||||
|
if !ok {
|
||||||
|
closed = true
|
||||||
|
}
|
||||||
// resumed!
|
// resumed!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user