Move stop callbacks to be called after run() in sim2.
This commit is contained in:
parent
75a4f3b7c9
commit
8b004fe8e3
|
@ -872,9 +872,6 @@ public:
|
|||
|
||||
virtual void stop() {
|
||||
isStopped = true;
|
||||
for ( auto& fn : stopCallbacks ) {
|
||||
fn();
|
||||
}
|
||||
}
|
||||
virtual void addStopCallback( std::function<void()> fn ) {
|
||||
stopCallbacks.emplace_back(std::move(fn));
|
||||
|
@ -1002,6 +999,9 @@ public:
|
|||
}
|
||||
self->currentProcess = callingMachine;
|
||||
self->net2->stop();
|
||||
for ( auto& fn : self->stopCallbacks ) {
|
||||
fn();
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue