Re: Are there real use cases with the Java access modes?
Alex Otenko via Concurrency-interest <[email protected]> Sat, 17 Jul 2021 23:14:25 +0100
| Newsgroups | gmane.comp.java.jsr.166-concurrency |
|---|---|
| Message-ID | <CANkgWKg_vq9z08zD-3Ug=zbW0QNj+fq6vxfW2TtR_dde76nV1A@mail.gmail.com> |
I think it is easy to test what happens, if you don't allow that to happen. To do that, declare everything volatile. You can use byte code instrumentation to achieve that. You can see at least two things: a. How slow everything becomes b. How it doesn't improve correctness. Alex On Sat, 17 Jul 2021, 21:46 Gregg Wonderly via Concurrency-interest, < [email protected]> wrote: > One of the standing problems I have is optimizations around non-volatile > value references. Currently, there are visibility optimizations that turn > > while( nonVolatileRefExpr ) {} > > Into > > if( nonVolatileRefExpr ) { while( true ) {} } > > Which creates infinite loops. This makes one of the most common types of > applications written in Swing to fail to work as the code is written. > > Gregg Wonderly > > Sent from my iPhone > > On Jul 17, 2021, at 4:33 PM, Shuyang Liu via Concurrency-interest < > [email protected]> wrote: > > > Hello, > > My colleagues and I have been working on a formal model for the Java > access modes that is added since Java 9 [1]. Are there any popular use > cases of access modes in real world applications/frameworks/libraries? We > would like to see how our current formal model works in real examples. > > Thanks you, > Shuyang Liu > > [1]. Using JDK 9 Memory Order Modes > http://gee.cs.oswego.edu/dl/html/j9mm.html > _______________________________________________ > Concurrency-interest mailing list > [email protected] > http://cs.oswego.edu/mailman/listinfo/concurrency-interest > > _______________________________________________ > Concurrency-interest mailing list > [email protected] > http://cs.oswego.edu/mailman/listinfo/concurrency-interest > _______________________________________________ Concurrency-interest mailing list [email protected] http://cs.oswego.edu/mailman/listinfo/concurrency-interest