to do a notify() / wait() over an object, synchronized() is needed.