[concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor? (original) (raw)
Vitaly Davidovich vitalyd at gmail.com
Tue Oct 27 01:07:22 UTC 2015
- Previous message: [concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor?
- Next message: [concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
C2 does inline it but intentionally forbids commoning out reads of Reference.get. However, this needs a real fix not a hack.
sent from my phone On Oct 26, 2015 3:22 PM, "Justin Sampson" <jsampson at guidewire.com> wrote:
Alex Otenko wrote:
> Wouldn't it be possible to add a test that will always be false? > > eg > [...] > if (get() != referent) { > [...] > > The point being that referent would need to stay alive due to > Java semantics to align with get() and queue assignment. Couldn't the compiler just inline get() as this.referent, see that this.referent was just set to referent, and simplify this.referent != referent to false? Cheers, Justin
Concurrency-interest mailing list Concurrency-interest at cs.oswego.edu http://cs.oswego.edu/mailman/listinfo/concurrency-interest
- Previous message: [concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor?
- Next message: [concurrency-interest] Is Reference.reachabilityFence() needed in Reference constructor?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]