Project Loom

Talk topics & reminders


Blogs and wikis

Open JDK Wiki

blocking vs no blocking

slide com summary: slides

Talk Summaries

Prepare for What ‘Looms’ Ahead

Speaker: Heinz Kabutz link



sc3/4 - best deal search

sc5/6 - search in background

sc7 - CompletableFuture


sc completed futures

debuging is hard


What pools did you choose for CPU vs IO? Fixed vs Cached Thread Pool?

what pool uise for io/cpu bound, fixed for CPU bound, cache is tricky

both are unlimted ppols limited by hardware and not java (Fixed thread pool), fixed by thread number, but unlimted pool (2bi level)

reality fixed thread pool get a limite because after too many connections queeus is too long, nothing to do, unlimited queue but can still wait too long

(Task wrapped in completad futues) , cached thread pool has no queue, if new job comes makes a new thread, thread numbers will evententu run out, limited by hardwarres and not java



Carrier = OS Thread? Or different identity?

A carrier thread is a normal java thread, backed by a native thread, (limited by hardware threads)



The second execeutor service you can’t use the same one, otherwhite the join is not work correctly (slide structure concurrency)


maged blopcker slides, on previous you need to specificy a thread, if you block managed way the fork can construi more thread to keep the paralelmis at your desired level.

as thread gest blocket, fork join poll wil craete more threds up to some limite

(manager blocker uses in jdk, phaser, completable etc.)




affects a lto of other parts


syncronized not fully completed with loom

the code blocked all the carrier threads (wait method) that is why there is no output)

current version hardwar thread x 16

If you are working with loom, dont use syncronized wait,


they ar echeting a beat, they havent’solve the problem of how to managed syncronized and wait, they just patched over the bitch alying to make more threads if that happens



reentrantlock back to syncronized due to performance issues

(syncronized are performed work in both way)

sycnronized if you don’t need it, no big penalties


Virtual threads threadlocal, try to move it away as much as you can


sc28, 29

What is JPS? histogram? sockeclimitscharter on cli

You don’t need to have unblocking IO with virtual threads


half kb per thread

How long does it take to just create these millions of threads? So basically: How long did it take to startup the service?

vthreads are fast, sockets are slow

Tooling he is not sure, java flight recorder, compatibable,

Random notes

Concurrenty in practice book

Research Concurrency Price

Index _