Creating Regular Directories The Files class provides two methods to create regular directories. The create-Directory() method fails to create a… Read more
Category: Sleeping and Waking Up
Interrupted – Concurrency: Part I
Interrupted This means that another thread invoked the interrupt() method on the waiting thread. The awakened thread is enabled as… Read more
Threads and Concurrency – Concurrency: Part I
22.1 Threads and Concurrency We first look at some basic concepts before diving into multithreaded programming in Java. Multitasking Multitasking… Read more
Blocking for I/O – Concurrency: Part I
Blocking for I/O A running thread, on executing a blocking operation requiring a resource (like a call to an I/O… Read more
Limiting Traversal by Depth Specification – Java I/O: Part II
Limiting Traversal by Depth Specification The walk() method at (4) in Example 21.5 is called multiple times in the for(;;)… Read more
Directory Hierarchy Traversal – Java I/O: Part II
Directory Hierarchy Traversal Tree traversal is an important topic in computer science. Other synonyms used in the literature for traversing… Read more
Extending the Thread Class – Concurrency: Part I
Extending the Thread Class A class can also extend the Thread class to create a thread. A typical procedure for… Read more
Thread Lifecycle – Concurrency: Part I
22.4 Thread Lifecycle Before diving into the lifecycle of a thread, a few important thread-related concepts should be understood. Objects,… Read more
Thread Priorities – Concurrency: Part I
Thread Priorities Threads are assigned priorities that the thread scheduler can use to determine how the threads will be scheduled…. Read more
Synchronized Methods – Concurrency: Part I
Synchronized Methods If the methods of an object should only be executed by one thread at a time, then the… Read more