Skip to content

Commit

Permalink
Stopped flag is now set true after simulate_until loop is finished (#656
Browse files Browse the repository at this point in the history
)

* Stopped flag is now set true after simulate_until loop is finished

* Removed unnecessary space

Co-authored-by: MAGSTE <[email protected]>
  • Loading branch information
msteinsto and MAGSTE authored Sep 14, 2021
1 parent 69c8ff9 commit a2c204f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cosim/execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ class execution::impl
stepSize = step();
timer_.sleep(currentTime_);
} while (!stopped_ && !timed_out(endTime, currentTime_, stepSize));
return !stopped_;
bool isStopped = stopped_;
stopped_ = true;
return !isStopped;
});
}

Expand Down

0 comments on commit a2c204f

Please sign in to comment.