Unlocking Efficiency Gains Using Java Virtual Threads

Author(s): Nilesh Jagnik

Publication #: 2411112

Date of Publication: 07.07.2024

Country: USA

Pages: 1-4

Published In: Volume 10 Issue 4 July-2024

DOI: https://doi.org/10.5281/zenodo.14250707

Abstract

Concurrency has always been desirable in software systems, especially in applications that are I/O bound, because it can drastically improve the throughput and scalability of the system. A common way to achieve concurrency is multithreading. In the past, multithreading had scalability limits due to threads being expensive. To achieve higher scalability developers had to use asynchronous programming instead.However, asynchronous programming has its own drawbacks and has limited language support. Virtual threads, released in Java 21, are cheap and lightweight threads.Multithreading with the use of virtual threads can remove the scalability limits that it previously used to have. In this paper, we take a look at virtual threads, their benefits, uses and the caveats associated them.

Keywords: Concurrency, Multithreading, Asynchronous Programming, Software Efficiency, Scalability

Download/View Paper's PDF

Download/View Count: 139

Share this Article