Skip to content

Commit 1c3ee0f

Browse files
committed
stop method to manually stop the simulation before it completes. #14
1 parent c0a1256 commit 1c3ee0f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
## 0.3.0
22

33
* Access the list of created resources.
4-
* Added: `runState` to check if the simulation has not started, is running, or has completed.
4+
* Added
5+
* `runState` getter to determine whether the simulation has not started, is running, or has completed.
6+
* `stop` method to manually stop the simulation before it completes.
57

68
## 0.2.0
79

lib/src/simdart.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ class SimDart implements SimDartInterface {
144144
return _buildResult();
145145
}
146146

147+
void stop() {
148+
_terminator?.complete();
149+
}
150+
147151
@override
148152
SimCounter counter(String name) {
149153
return _counterProperties.putIfAbsent(name, () => SimCounter(name: name));

0 commit comments

Comments
 (0)