This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Don't you need two loops in two separate threads? At the moment, other than the first call to doSomethingAndRepeat in the main method, you've got the calls to wait and notify in the same thread. Which means the thread is waiting for itself.
This probably isn't what you wanted, but here's a similar example where two threads take it in turns.
Joined: Jan 22, 2004
Thanks for the reply. I decided to go for a less elegant polling solution in the end. Cheers, James.