multithreading - Android pause specific thread -
i have following thread code send message when sleep. having trouble pausing it. how can ? cannot see id , not want stop thread, this.
new thread() { @override public void run() { while(true) { try { thread.sleep(500); } catch (interruptedexception e) { } message m5 = d.obtainmessage(); d.sendmessage(m5); } } }.start();
to pause thread call wait()
thread
.
then call notify()
resume it.
Comments
Post a Comment