Java
229 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- 6.35 LinkedBlockingQueuehistorical
LinkedBlockingQueue uses a singly linked list with separately coordinated reads and writes. These notes trace waiting and notification through its node structure.
- 6.36 RejectedExecutionHandlerhistorical
When a thread pool's workers and queue are full, a rejection handler processes new tasks. These notes examine RejectedExecutionHandler implementations.
- 6.37 Deadlockhistorical
Java examples create a deadlock and inspect thread states to show how mutual waiting prevents progress.
- 6.38 Fair ReadWriteLockhistorical
These notes follow ReentrantReadWriteLock source code to examine fair read-write locking and how the wait queue participates in acquisition.
- 6.39 Fair Semaphorehistorical
A fair semaphore allocates permits under a fairness policy. These notes trace permit acquisition and queuing through FairSync.
- 6.40 Thread Stateshistorical
Java threads transition between execution states. These notes use the thread-state enumeration and a state diagram to organize those relationships.
- 6.41 PriorityBlockingQueuehistorical
PriorityBlockingQueue uses a binary heap for a priority-ordered blocking queue. These notes examine its array representation, ordering, and waiting on an empty queue.
- 6.42 SynchronousQueuehistorical
SynchronousQueue stores no elements, so writes must pair with reads or wait. These notes trace the process through its transfer structures.
- 6.43 Atomichistorical
Atomic classes provide thread-safe atomic operations through mechanisms such as CAS. These notes trace implementation using AtomicInteger.
- Java Production Issue Troubleshootinghistorical
Java production troubleshooting can start by finding resource-heavy processes with tools such as top, then locating related threads or code. These notes record diagnostic steps.