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

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -