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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -