Java
You're viewing a free preview. Sign in free to read every script.
Why this exists Checking endpoints one after another is slow, and the work is almost entirely waiting for the network. Java's executors run tasks on a pool of threads, and CompletableFuture lets you start many tasks and…
A Concurrent Health Checker with ExecutorService, CompletableFuture and Virtual Threads
Check many endpoints in parallel with a bounded thread pool, collect and sort the results, handle interruption correctly, and see how Java 21 virtual threads simplify I/O-bound fan-out.
Sign in free to read this script, along with the rest of the library.
Sign in free