... | ... | @@ -42,9 +42,9 @@ This method will be called once by the framework before it executes the stage fo |
|
|
Finally, we want to terminate the stage.
|
|
|
Calling the method ``terminate`` will do so and additionally send a signal to all ongoing stages to terminate.
|
|
|
But do we need to do, if there is no kind of "termination point"?
|
|
|
In some cases, you want to execute something in an endless loop manner.
|
|
|
In some cases, you want to execute something in an endless loop manner.
|
|
|
Take a look at the [Clock stage](https://build.se.informatik.uni-kiel.de/gitlab/teetime/teetime/blob/master/src/main/java/teetime/stage/Clock.java).
|
|
|
It generates endlessly elements and has not point where it terminates.
|
|
|
It endlessly generates elements and has not point where it terminates.
|
|
|
To indicate TeeTime this behavior, we need to modify the termination strategy of the stage.
|
|
|
By default, it terminates itself, like the InitialElementProducer of the example above.
|
|
|
In such cases like the Clock, we need to terminate it by interrupt.
|
... | ... | |