You can start a process that runs a schedule in a separate thread. Then the main thread can always respond to user input. On the other hand, if you cannot kill another process while it is running, the end result will not be different. The entire application will not be able to stop until this process is complete. If, however, you can kill another process at any time, then several (two) threads will probably work well.
source
share