Programming Tutorials

Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan



Comment Added by : sumit

Comment Added at : 2014-10-30 08:14:55

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
You are using "this" to start to the thread before constructor has completed. Isn't it a wrong practice to use incompletely initialize objects by letting them escape before constructor completes-
Producer(Q q) {
this.q = q;
new Thread(this, "Producer").start();
}


View Tutorial