Virtual Threads, Structured Concurrency, and Scoped Values (eBook)
XIII, 79 Seiten
Apress (Verlag)
979-8-8688-0500-4 (ISBN)
Discover the exciting new APIs introduced by Java's Project Loom. This quick guide covers all the essential concepts the Java developer needs in order to understand virtual threads, structured concurrency, and scoped values.
Authors Ron Veen and David Vlijmincx clearly explain the superiority of virtual threads, introduced in Java 21, over the traditional Java threads of the past 25 years. Then they dive into how structured concurrency streamlines interactions by treating related threads as a unified unit of work, akin to the impact of structured programming on regular programming. From there, the authors explore the third Project Loom API and scoped values, clarifying their advantages over regular ThreadLocals and providing efficient usage insights. The book concludes with an exploration of common scheduling strategies.
By the end of this book, you will have a solid understanding of the concepts behind Project Loom and will be able to immediately apply this knowledge to your own code.
You Will
- Discover what virtual threads are, why they were created, and how to use them in your code
- Gain insight into how concurrency improves the observability of code
- Write your own StructuredTaskScopes tailored to your needs
- Understand why you should replace ThreadLocals with Scoped Values
- Know the different strategies for multithreaded computer programs
Who This Book is For
Java developers of any level. This knowledge is so fundamental to staying relevant in the Java job market that every developer needs to understand it for their career development.
Discover the exciting new APIs introduced by Java's Project Loom. This quick guide covers all the essential concepts the Java developer needs in order to understand virtual threads, structured concurrency, and scoped values.Authors Ron Veen and David Vlijmincx clearly explain the superiority of virtual threads, introduced in Java 21, over the traditional Java threads of the past 25 years. Then they dive into how structured concurrency streamlines interactions by treating related threads as a unified unit of work, akin to the impact of structured programming on regular programming. From there, the authors explore the third Project Loom API and scoped values, clarifying their advantages over regular ThreadLocals and providing efficient usage insights. The book concludes with an exploration of common scheduling strategies.By the end of this book, you will have a solid understanding of the concepts behind Project Loom and will be able to immediately apply this knowledge to your own code. You Will Discover what virtual threads are, why they were created, and how to use them in your code Gain insight into how concurrency improves the observability of code Write your own StructuredTaskScopes tailored to your needs Understand why you should replace ThreadLocals with Scoped Values Know the different strategies for multithreaded computer programs Who This Book is ForJava developers of any level. This knowledge is so fundamental to staying relevant in the Java job market that every developer needs to understand it for their career development.
Erscheint lt. Verlag | 4.9.2024 |
---|---|
Reihe/Serie | Apress Pocket Guides |
Zusatzinfo | XIII, 79 p. 11 illus. |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
Mathematik / Informatik ► Informatik ► Software Entwicklung | |
Schlagworte | Concurrency • Concurrency Models • Java • Java 21 • project loom • structured concurrency • virtual threads |
ISBN-13 | 979-8-8688-0500-4 / 9798868805004 |
Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
Haben Sie eine Frage zum Produkt? |
Größe: 2,6 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich