Skip to content

Commit cd670ec

Browse files
committed
Merge pull request #197 from eregon/mvm
Prevent the preemption timer to run when termination is requested
2 parents 8b7f126 + 486de95 commit cd670ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vm/boostenv/main/boostvm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ void BoostVM::run() {
164164
}
165165

166166
void BoostVM::onPreemptionTimerExpire(const boost::system::error_code& error) {
167-
if (error != boost::asio::error::operation_aborted) {
167+
if (error != boost::asio::error::operation_aborted &&
168+
!_terminationRequested) {
168169
// Preemption
169170
vm->setReferenceTime(env.getReferenceTime());
170171
vm->requestPreempt();

0 commit comments

Comments
 (0)