11 lines
No EOL
288 B
Markdown
11 lines
No EOL
288 B
Markdown
|
|
|
|
## How do the **`wait()`** and **`notify()`** methods interact?
|
|
|
|
---
|
|
|
|
🛑
|
|
|
|
- **`wait()`**: Causes the current thread to block and enter the **Waiting** state.
|
|
- **`notify()` / `notifyAll()`**: Invoked by _another_ thread to move the waiting thread(s) back to the **Runnable** state.
|
|
|