
Java ExecutorService Usage and Thread Pools Done Properly
Use ExecutorService correctly: choose a pool type, submit Runnable and Callable, handle Future results and exceptions, bound the queue and shut down cleanly.
Threads, executors, locks, CompletableFuture and virtual threads, and the races hiding between them.

Use ExecutorService correctly: choose a pool type, submit Runnable and Callable, handle Future results and exceptions, bound the queue and shut down cleanly.

Test async code and schedulers in Java reliably: Awaitility instead of sleep, injectable executors, fake clocks and Spring Async and Scheduled.

Size a Java thread pool with the cores times wait over compute formula, split CPU and IO pools, measure, and consider virtual threads.

Why Hibernate throws StaleObjectStateException when two users edit one row, and how to handle it with versioning, retries or pessimistic locks.

Compare ScopedValue and ThreadLocal in Java 25: immutability, bounded lifetime, inheritance by forked tasks, memory cost with virtual threads and migration.

Reproduce lost updates and check then act races in Java, learn the patterns that signal a race, fix them with atomics and locks and test for them under load.

Run periodic and cron jobs in Quarkus with the Scheduler extension, handle concurrency and identity, and switch to Quartz for clustered, persistent jobs.

Turn on parallel test execution in JUnit 5: the configuration properties, execution modes, @Isolated and resource locks, and the shared state that breaks.

Build truly immutable Java classes with final fields, defensive copies and records, and see why shallow immutability fails and why it is thread safe.

How synchronized uses monitors, what lock contention looks like in a thread dump, how to shrink critical sections and what changed for virtual threads.

Use ReentrantLock for timed and interruptible locking and Condition for waiting on state, with a bounded buffer example and the unlock-in-finally rule.

Use ReentrantReadWriteLock when reads outnumber writes and StampedLock for optimistic reads, with the traps of lock upgrades, reentrancy and measuring first.
We send one email when a new post is published. No spam.