Thread: Wait Exception?
View Single Post
  #2   Spotlight this post!  
Unread 15-01-2010, 08:35
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Wait Exception?

You didn't post your code, but the likely problem is that in Java you need to lock your object before doing a wait() or notify() on it. The Java wait() will unlock the object, wait until it receives a notify, then relock the object.

You can find some details on this in the Java Tutorial:
http://java.sun.com/docs/books/tutor...guardmeth.html
Reply With Quote