Welcome to the Project Loom demonstration for JVM Meetup #59. This repository contains various Java applications designed to showcase the capabilities and features of Project Loom, a part of the Java Project aiming to simplify concurrency in the Java platform.
Project Loom introduces a new concept of virtual threads, offering a lightweight and efficient way of handling concurrency in Java applications. In this demonstration, we will explore different scenarios where virtual threads can be utilized, ranging from simple initialization to CPU-intensive tasks.
The repository is organized into the following structure:
├── Makefile
├── Readme.md
├── cpu-intensive-virtual-thread
├── exception-virtual-thread
├── init-virtual-thread
├── massive-virtual-thread
├── pinned-virtual-thread
├── thread-overflow
└── thread-pool
Each subdirectory contains a specific Java application demonstrating a unique aspect of virtual threads.
Prerequisites
- Java JDK 21 or higher
- Gradle 8.4 or higher
To compile all modules, use the following command:
make compile
- Thread Overflow Example:
make run-thread-overflow
- Thread Pool Example:
make run-thread-pool
- Initializing Virtual Thread Example:
make run-init-virtual-thread
- Massive Virtual Thread Example:
make run-massive-virtual-thread
- CPU Intensive Virtual Thread Example:
make run-pinned-virtual-thread
- run-exception-virtual-thread
make run-exception-virtual-thread