If a thread isn’t currently waiting but notify() is called on it, then the next time that thread calls wait(), it’ll return from the wait immediately and continue to run.
What happens if notify() is called on the thread twice while it isn’t waiting? Does the thread return immediately the next two times it calls wait(), or does it only return immediately the first time and then reset the signal?
One more question: say that a Thread 1 calls notify() on another Thread 2 which isn’t currently waiting, but which isn’t schedule to run next either. Does calling notify() on Thread 2 update its scheduling so that it runs next? Or do threads simply continue to run as scheduled, with Thread 2 getting its signal set so that the next time it calls wait() it just returns immediately?