multithreading - Java. Simple thread operation exchange -


i writing simple java tcp client app. connection handled in thread, , confused, how can process functions in main thread class? should use special static class? or there "scheduler", proccess actions between threads?

/* in main object or thread */ synchronized (someobject) {     someobject.wait(); }  /* in tcp connection thread / object */ synchronized (someobject) {     someobject.notify(); } 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -