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

c# - HttpResponseMessage System.InvalidOperationException -

sql - Postgresql error: "failed to find conversion function from unknown to text" -