[GREENFOOT-667] Make debug VM poll shared memory during post-act pause
In the old debug VM, when the user moved the speed slider, we interrupted the current pause of the simulation thread, so that it could proceed if the speed had now gone up.
With the current changes (as of 12/3/2018) in the rewrite, this no longer occurs, so putting the slider down to minimum then back up while running encounters a long simulation delay. Davin also points out that issuing a reset during a long frame pause will encounter the same issue. The suggested fix is to poll the shared memory for speed changes, reset commands and so on during the simulation pause (splitting it up into several smaller pauses, with a max wait of say 250ms between each poll). After this, we can probably simplify Simulation.setSpeed, which currently can be called from an arbitrary thread and has locking, but I think afterwards will only be called from the simulation thread.
Issue metadata
- Issue type: Task
- Priority: Medium