make token.Done idempotent
This commit is contained in:
parent
9f2675422a
commit
c5f878c941
@ -73,9 +73,11 @@ func (e *vmExecutor) Done() {
|
|||||||
e.lk.Lock()
|
e.lk.Lock()
|
||||||
defer e.lk.Unlock()
|
defer e.lk.Unlock()
|
||||||
|
|
||||||
e.token.Done()
|
if !e.done {
|
||||||
e.token = nil
|
e.token.Done()
|
||||||
e.done = true
|
e.token = nil
|
||||||
|
e.done = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type executionToken struct {
|
type executionToken struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user