Back
Thread Signaling in Java
Search Query: Java Threads
Tags: Java Java Concurrency Java Multithreading Java Thread Signaling Missed Signals Spurious Wakeups
Java has a set of thread signaling features that enable one Java thread to coordinate its actions with another. These basic thread signaling features are provided via the Object class wait() , notify() and notifyAll() methods.
When implementing thread signaling in Java you need to be aware of the problem of missed signals and spurious wakeups. I cover both in this video too.
Chapters:
0:00 Java Thread signaling introduction - wait(), notify() and notifyAll()
1:50 Calling wait(), notify() or notifyAll() must be done from within a synchronized block
2:31 Calling wait() releases the synchronization lock
5:50 Designing a thread signaling class in Java
9:17 Missed signals
17:24 notify() vs. notifyAll()
19:24 Spurious wakeups
Java Thread Signaling - text:
https://jenkov.com/tutorials/java-concurrency/thread-signaling.html
Java Concurrency - text:
https://jenkov.com/tutorials/java-concurrency/thread-signaling.html
Java Concurrency - playlist:
https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4
Tags: Java Java Concurrency Java Multithreading Java Thread Signaling Missed Signals Spurious Wakeups
Java has a set of thread signaling features that enable one Java thread to coordinate its actions with another. These basic thread signaling features are provided via the Object class wait() , notify() and notifyAll() methods.
When implementing thread signaling in Java you need to be aware of the problem of missed signals and spurious wakeups. I cover both in this video too.
Chapters:
0:00 Java Thread signaling introduction - wait(), notify() and notifyAll()
1:50 Calling wait(), notify() or notifyAll() must be done from within a synchronized block
2:31 Calling wait() releases the synchronization lock
5:50 Designing a thread signaling class in Java
9:17 Missed signals
17:24 notify() vs. notifyAll()
19:24 Spurious wakeups
Java Thread Signaling - text:
https://jenkov.com/tutorials/java-concurrency/thread-signaling.html
Java Concurrency - text:
https://jenkov.com/tutorials/java-concurrency/thread-signaling.html
Java Concurrency - playlist:
https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4
Ask VidTutorAssistant
Comment
or
Question
or
Question
Your name
Comments with generated responses
@rm6267
2022-10-26
In this case 12:47 it's not necessary to used atomic type in signalRaised because is synchronized all the class with synchronized(this) {}?
@JakobJenkov
VidTutorAssistant (GPT-4)