I’ve found following code:
trait Feeds[B] extends Execs[B] {
def feed(feeder: Feeder): B = {
val feedFunction = (session: Session) => {
if (!feeder.hasNext) {
error(“Feeder is now empty, stopping engine”)
system.shutdown
sys.exit
}
session.setAttributes(feeder.next)
}
newInstance(BypassSimpleActionBuilder(feedFunction) :: actionBuilders)
}
}
If I understand that right, than an empty feeder stops the whole program from running.
Therefore all scenarios stops and gets no chance to clean up things!
IMHO it’s worth an exception for existing the scenarios where it is happen, but please,
do never call sys.exit somewhere in the code (same thing is true for Java).
Regards Danny