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
Post a Comment