In this video, learn how to recognize that a parent thread will normally not be able to finish executing until after all of its children have terminated. Discover that daemon threads are intended to run in the background for tasks like garbage collection and will not prevent their parent from terminating.
- We often create threads to provide … some sort of service, or perform a periodic task … in support of the main program. … A common example of that is garbage collection. … A garbage collector is a form of automatic memory management … that runs in the background and attempts to reclaim garbage, … or memory that's no longer being used by the program. … Many languages include garbage collection … as a standard part of their run time environment, … but for this demonstration, I'll spawn my own … new thread to handle garbage collection. … - Man, what a mess. … - Olivia is a separate child thread … that will execute independently of my main thread. … So, I can continue doing what I'm doing here, … getting my soup ingredients ready. … - While I try to reclaim some memory, … or counter space, by clearing out Baron's garbage. … - This set-up, with Olivia running as a separate thread … to provide that garbage collection service, … will work fine until I'm ready to finish executing. … Bam, now my soup's spiced and ready, …
- Parallel vs. sequential computing
- Shared vs. distributed memory
- Execution scheduling
- Thread lifecycle
- Mutual exclusion
- Synchronized methods
- Checking for liveness
Skill Level Advanced
Java Essential Training: Objects and APIswith David Gassner2h 46m Intermediate
Java Essential Training: Syntax and Structurewith David Gassner3h 9m Intermediate
1. Parallel Computing Hardware
2. Threads and Processes
3. Mutual Exclusion
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.