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

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -