Package net.kolotyluk.loom
Class Experiment90_Orientation
java.lang.Object
net.kolotyluk.loom.Experiment90_Orientation
Experiment Suite 01 - Orientation
We're going to start off by running two identical experiments, one with conventional Platform Threads and the other with Loom Virtual Threads, so we can compare the results. If you do something like
System.out.println(Thread.currentThread().toString()));You will get what I call a 'Thread Signature.' For Platform Threads, the Thread Signature looks like
Thread[#16,Thread-0,5,main]where
- Thread
- distinguishes this from a Virtual Thread
- #16
- is the raw Thread ID
- Thread-0
- is
- 5
- is
- main
- is
VirtualThread[#31]/runnable@ForkJoinPool-1-worker-1where
- VirtualThread
- distinguishes this from a Platform Thread
- #16
- is the raw Thread ID
- runnable>
- is
- ForkJoinPool-1
- is the Thread Pool the ExecutorService spawned the thread on
- worker-1
- is the Carrier Thread that the Virtual Thread is running on
- Author:
- eric@kolotyluk.net
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Experiment90_Orientation
public Experiment90_Orientation()
-
-
Method Details
-
main
-