Improve SCLConsole Interrupt Command action handling
The current Interrupt Current Command
is badly implemented. It just synchronously waits for 1 second, getting the UI stuck for that time and blatantly invokes Thread.stop()
which is dangerous anyway.
-
Wait for 5 seconds for command interruption to finish before popping a dialog that asks whether user wants to wait more or forcelly stop the command execution ( = Thread.stop
) -
Don't block the UI thread while waiting for 5 seconds, use ThreadUtils.getNonBlockingWorkExecutor()
instead to schedule the work -
Poll if the currently executing command finishes while showing the dialog and close it automatically if the command it finishes
Edited by Tuukka Lehtonen