Github user franz1981 commented on the pull request:

    
https://github.com/apache/qpid-jms/commit/c66d888114021da31d9032c841c08903dd31cc89#commitcomment-29578801
  
    In 
qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java:
    In 
qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java 
on line 49:
    Just a note: `error` could be declared as a plain field (avoiding expensive 
full barriers due to the volatile store of it).
    To allow atomic write/read of it can be used the acquire/release semantic 
provided by the Java Memory Model ie `STATE_FIELD_UPDATER.lazySet(this, 
FAILURE)` will store-release anything written before it (error = result) while 
`isComplete` (that contains a volatile load of `state`) is load-acquiring 
anything store-released by `state` (the value of `error`).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to