New Early Access builds
Mark Raynsford
org.openjdk at io7m.com
Tue Jun 30 18:23:35 UTC 2020
On 2020-06-29T07:50:07 +0100
Alan Bateman <Alan.Bateman at oracle.com> wrote:
> There are a couple of API tweaks and renames. The "Getting started" [2]
> has been updated so it is aligned with the current APIs.
>
> -Alan
>
> [1] http://jdk.java.net/loom/
> [2] https://wiki.openjdk.java.net/display/loom/Getting+started
Small question, as I'm a little uncertain:
What is the correct way to say "Start a set of N virtual threads that
all execute on the current carrier thread"?
I have some code where I'd like:
1. A non-virtual thread T to start a set S of virtual threads to perform
various I/O operations...
2. Have T wait for the virtual threads to complete...
3. Then have T continue on its way afterwards, without at any point
having to deal with synchronization (as it would if the threads in
S were non-virtual, or were scheduled on different carrier threads).
Is there actually something in the API currently to do this? It seems
like all of the executors use a ForkJoin pool. I could write an
executor myself, but it's not clear if I actually have to.
--
Mark Raynsford | https://www.io7m.com
More information about the loom-dev
mailing list