Starter examples for testing EA builds
Alan Bateman
Alan.Bateman at oracle.com
Tue Mar 17 10:01:15 UTC 2020
On 17/03/2020 08:49, Remi Forax wrote:
> Shameless plug :)
> There are some examples here
> https://urldefense.com/v3/__https://github.com/forax/loom-fiber__;!!GqivPVa7Brio!N1WCeRNSGlVhkX1dpZULpwrtI03yRZl6QzWLAjVvfPsJw83LLaFn7hSCkR1Ge02D9w$
>
> There are more examples of how continuation works than how virtual threads works, mostly because you can take any examples that creates threads and replace them by virtual threads [1], easily.
Just to set expectations, it's probably best for those trying out the EA
builds to ignore the Continuation class. Yes, it is tempting to start
there but this project isn't planing to directly expose continuations at
this time (Continuation will probably move to a non-exported package as
some point). Your second point is good, a lot of existing code that
creates threads or uses executor service, can be changed to use virtual
threads. We're interested to hear how far people can get. There are some
limitations, like pinning when doing blocking I/O while holding a
monitor, so we are interested to hear how much effort it was to migrate
existing code. We are also interested in performance/benchmarks and
stability/bug reports.
-Alan
More information about the loom-dev
mailing list