calling thread.sleep stalls main gui
Hi,
When I call thread.sleep in another thread, it seems to stall even the main event thread (the gui doesn't update itself for a long period of time). I was wondering if calling thread.sleep influences any of the other threads that may be running at the same time?
This is correct and expected behavior
The thread that invokes the sleep command is the one that is put to sleep.
It does not matter on what thread u invoked the sleep method, always the calling thread goes to sleep.
Therefore, in your case the main thread itself is going to sleep.