testList.wait(); //什么含义?
private List testList;
testList= new ArrayList();
testList.wait(); //什么含义?
问题点数:10、回复次数:4Top
1 楼interpb(曾曾胡,深怕情多累美人!)回复于 2006-03-08 17:55:07 得分 0
等待资源释放Top
2 楼treeroot(旗鲁特)回复于 2006-03-08 18:27:45 得分 0
upTop
3 楼zx2002027(http://www.netyi.net/in.asp?id=zx2002027)回复于 2006-03-08 19:51:27 得分 5
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.
使当前线程进入等待状态,直到被其他线程唤起Top
4 楼sandyen(杉叶)回复于 2006-03-08 19:55:50 得分 5
线程间互相通讯的一种手段。
当你调用testList.wait();的时候,当前线程会一直堵塞在这个方法上面。
知道另外一个线程调用testList.notify()或者testList.notifyAll(),你的testList.wait()后面的代码才能被执行。Top




