Prepare for what "Loom"s ahead by Dr. Heinz Kabutz

Explore the future of Java networking with Dr. Heinz Kabutz, covering virtual threads, biased locking, and more, including limitations and best practices for concurrent and parallel computing.

Key takeaways
  • Prepare for what “Loom”s ahead by Dr. Heinz Kabutz:
    • Java networking is now interruptible with virtual threads
    • Biased locking helped in the past, but modern hardware makes it obsolete
    • Synchronize is not fully compatible with Loom
    • Don’t ignore interrupted exceptions in code
    • Virtual threads have limitations, such as no reuse and no stack trace
    • Managed blockers are useful for blocking work, but not for non-blocking work
    • Fork join pool can be used for parallel computing, but with limitations
    • Structured concurrency is introduced in Loom, which helps with debugability and readability
    • Cancelled tasks will be garbage collected
    • Deadlocks are hard to find with virtual threads
    • Back pressure is a limitation in Loom
    • Virtual threads are cheap to create and don’t require pooling
    • Executor services with virtual threads can be used for concurrent computing
    • Virtual threads can be used for parallel computing, but with limitations