bThink-BGU / BPjs

Environment for running behavioral programs written in JavaScript.
MIT License
36 stars 8 forks source link

Executors are not being shutdown when setting daemon mode to false #24

Open mgenah opened 6 years ago

mgenah commented 6 years ago

I use BPjs program when running an external framework (robocode). I set daemon mode to false when completing the run (battle), but I still get log prints on threads that are still running: Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-1 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-2 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-3 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-4 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-5 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot to stop thread ForkJoinPool-1-worker-6 Waiting for robot il.ac.bgu.cs.bp.bpjsrobot.BPjsRobot* to stop thread ForkJoinPool-1-worker-7

michbarsinai commented 6 years ago

@mgenah Cannot reproduce this, but the executor system in 0.8.6 was re-written, so please re-test once it's out.

mgenah commented 6 years ago

I tested it with 0.8.6 and it still happens. Is there any tuning I am missing?

michbarsinai commented 6 years ago

Based on our chat, seems we need to re-architect the thing again, to support external stops. @mgenah - if you could create a unit test that demonstrates the problem, that would be great. If you do, please mark the test with @Ignore (http://junit.sourceforge.net/javadoc/org/junit/Ignore.html) prior to pushing it to develop, so as not to break the build.

michbarsinai commented 2 years ago

Seems to be a stale and solved issue. Still - need to try and reproduce. Document and close if can't.