Implement onPause using wait() and notify()