Calling sleep on current thread stalls my main GUI
问题 I have one class DataThread inherited from Thread. I am using two DataThread objects ReadThread and WriteThread . I have another thread where Main_GUI is running. Now when I press a button on main_GUI it calls a method x.method1() and then this method uses the WriteThread method WriteThread.sleepForReset(). In public void sleepForReset(){ try { sleep(28000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } When I press the button on main_GUI the