git clone https: //github.com/ochaloup/byteman-workshop.git
setup.sh # or setup variables BYTEMAN_HOME and BYTEMAN_JAR
cd task5
mvn install
java -javaagent:$BYTEMAN_JAR=script:./ThreadMonitorHistory.btm,boot:/home/ochaloup/.m2/repository/org/jboss/byteman/byteman-sample/4.0.0/byteman-sample-4.0.0.jar,boot:$BYTEMAN_JAR -cp target/byteman-workshop-task5-1.0.0-SNAPSHOT.jar -Dorg.jboss.byteman.transform.all org.jboss.btm.workshop.Task5Main
you can observe hanging program (Byteman 4.0.0)
Description
The helper should shutdown the scheduled executor when all features are finished for not hanging. Tested that's a trouble for case of calling the method writeAllEventsToFile with argument 0.