Tag

JDK19

0 views collected around this technical thread.

Cognitive Technology Team
Cognitive Technology Team
May 3, 2023 · Fundamentals

Correct Usage of ThreadLocalRandom and the Predictable Random Number Pitfall in Java

The article explains why ThreadLocalRandom should not be stored in a static field, demonstrates how using ThreadLocalRandom.current().nextX(...) avoids predictable random numbers, compares behavior between JDK 11 and JDK 19, and provides the proper usage pattern with code examples.

ConcurrencyJDK11JDK19
0 likes · 3 min read
Correct Usage of ThreadLocalRandom and the Predictable Random Number Pitfall in Java
macrozheng
macrozheng
Sep 28, 2022 · Backend Development

Why Java 19 Virtual Threads Outperform Traditional Threads and Go Goroutines

This article introduces Java 19's virtual threads, compares their performance and scheduling with traditional platform threads and Go goroutines, provides practical code examples, benchmark results, and migration guidelines, and explains the underlying M:N scheduling mechanisms that make virtual threads more efficient for high‑concurrency, I/O‑bound workloads.

ConcurrencyGoJDK19
0 likes · 22 min read
Why Java 19 Virtual Threads Outperform Traditional Threads and Go Goroutines