Using two threads and controlling one from the other in java?

Posted by sidra on Stack Overflow See other posts from Stack Overflow or by sidra
Published on 2010-12-26T02:20:35Z Indexed on 2010/12/26 2:54 UTC
Read the original article Hit count: 118

Filed under:
|

Can someone please help me out.
I need to use two threads in a way that one thread will run permanently while(true) and will keep track of a positioning pointer (some random value coming in form a method). This thread has a logic, if the value equals something, it should start the new thread. And if the value does not equal it should stop the other thread.

Can someone give me some code snippet (block level) about how to realize this?

© Stack Overflow or respective owner

Related posts about java

Related posts about multithreading