State of Loom
Ron Pressler
ron.pressler at oracle.com
Tue May 19 21:33:41 UTC 2020
I added this example to show the power of custom schedulers. But it doesn't currently
work without some changes in AOT (which we haven't done) to assertions on the thread
identity. Given that, I realised it would be too confusing, adding further explanations
would only be a distraction, and so I removed it.
The order of execution shouldn’t pose a problem.
— Ron
On 19 May 2020 at 21:19:10, Mike Rettig (mike.rettig at gmail.com(mailto:mike.rettig at gmail.com)) wrote:
> 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 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.
> >
> > https://urldefense.com/v3/__http://jdk.java.net/loom/__;!!GqivPVa7Brio!K6CYKUP1sk0TDnR0HVtMQUeXq9vyFwisNu0kgWGAMRyY6DKya8pXrkgceUrlgUmtIw$
> >
> > 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