How to deadlock a Java ExecutorService

(mlangc.github.io)

9 points | by 0x54MUR41 a day ago ago

3 comments

  • zbentley 17 hours ago ago

    Well written, but I do not understand why this is news. A thread will deadlock if asked to wait on itself, and that generalizes to any fixed size group of threads. That seems like it should be obvious to everyone.

    The standard guidance of avoiding join() without a timeout, only running leaf-like/bounded work on TPEs, considering common executor instances to be best-effort when it comes to important work, and of using (formally or informally) structured concurrency and purpose-specific executors with carefully managed lifetimes, watchdog timers, and ovservability is important. Given their skill at writing, I’d love for the author to tackle those in their next post; this one’s subject seems trivially-well-known.

  • exabrial 20 hours ago ago

    ok what blog package is this? This is beautiful

    • tolerance 20 hours ago ago

      It looks like the base Jekyll theme.