State of Loom
Mike Rettig
mike.rettig at gmail.com
Tue May 19 20:18:55 UTC 2020
I was intrigued by this example:
var uiVirtualThreadFactory = Thread.builder()
.virtual(java.awt.EventQueue::invokeLater).factory();
I noticed it was removed in the latest version. Was this example
removed due to the risk of out of order executions? The document still
mentions the pinning risk of using a single carrier thread. However,
it doesn't mention the potential for out of order executions even
though a single thread is used. Single threaded UI design typically
guarantees thread safe access to UI components and ordered executions.
As I understand it, virtual threads by design will execute out of
order and that might lead to some very surprising UI behavior.
Mike
On Fri, May 15, 2020 at 9:56 AM Ron Pressler <ron.pressler at oracle.com> wrote:
>
> Hello.
>
> I’ve posted a document describing the project’s goals and current progress:
>
> http://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part1.html
>
> It is accompanied by a new EA build, based on jdk-15+21.
>
> http://jdk.java.net/loom/
>
> The new continuations algorithm is now switched on by default, so if you haven’t
> explicitly turned it on before, you may see some performance improvements.
> You can switch it off with -XX:-UseContinuationChunks.
>
> — Ron
>
>
>
More information about the loom-dev
mailing list