rahmanusta / project-loom-code

Project Loom Samples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Loom - Code samples

Code examples are divided by package name and Project Loom Early-Access builds can be downloaded from http://jdk.java.net/loom/

hello

Check the ways how to create Virtual Threads and Virtual Thread Pool

crash

See how JVM crash if we try to create 1_000_000 threads, and how Virtual Threads handle

Exception in thread "main" java.lang.OutOfMemoryError:
unable to create native thread: possibly out of memory or process/resource limits reached

sync_async

See how synchronous and asynchronous code look. Asynchronous scale but has disadvantages. Structured concurrency scales and don’t have disadvantages in Asynchronous APIs.

pool

See how Virtual Thread Pools are scalable in terms of blocking operations.

perf

See how Virtual Threads are efficient when using blocking operations.

props

Hints the parallelism configuration for the Virtual Thread Pool.

Author

License

MIT

About

Project Loom Samples


Languages

Language:Java 100.0%