Обложка канала

Android Good Reads

2600 @droidgr

Самые интересные статьи, видео и новости, связанные с Android разработкой. Не больше трёх материалов в день.

Android Good Reads

4 года назад
Открыть в
В EAP билдах Java 19 появилась поддержка давно ожидаемого Project Loom – многопоточность на виртуальных тредах, которые можно создавать в миллионных количествах. В статье подробно рассказывается про то, как работать с такими виртуальными тредами, и какой перфоманс получается на выходе.
Loom and Thread Fairness

Project Loom (JEP 425) is probably amongst the most awaited feature additions to Java ever; its implementation of virtual threads (or "green threads") promises developers the ability to create highly concurrent applications, for instance with hundreds of thousands of open HTTP connections, sticking to the well-known thread-per-request programming model, without having to resort to less familiar and often more complex to use reactive approaches. Having been in the workings for several years, Loom got merged into the mainline of OpenJDK just recently and is available as a preview feature in the latest Java 19 early access builds. I.e. it’s the perfect time to get your hands onto virtual threads and explore the new feature. In this post I’m going to share an interesting aspect I learned about thread scheduling fairness for CPU-bound workloads running on Loom.

www.morling.dev