Learned wait() and notify()