Probably a bug

Kirill A. Korinsky kirill at korins.ky
Wed Feb 19 12:26:53 UTC 2020


Honestly? I don't like this code at all.

Call wait-free code that contains `do..while` at least strange.

And using lazy atomic operations and direct access to unsafe object where only one thread uses it... let me call it a good example of overengineering.

Anyway, this simplification do not fix an issue :(

-- 
wbr, Kirill

> On 19. Feb 2020, at 13:20, Andrew Haley <aph at redhat.com> wrote:
> 
> On 2/18/20 4:04 PM, Kirill A. Korinsky wrote:
>> 
>> The thread is looping inside do...while
>> 
>> As soon as I replaced it `getObjectVolatile` and `putOrderedObject` to direct access to volatile nothing is changed.
> 
> Good idea. Given that the published algorithm at
> http://www.1024cores.net/home/lock-free-algorithms/queues/non-intrusive-mpsc-node-based-queue
> specifies a releasing store when setting next, the use of
> putOrderedObject() here is very suspicious.
> 
> -- 
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
> 



More information about the shenandoah-dev mailing list