Mir

Code review comment for lp:~raof/mir/fix-threaded-dispatcher-death-test-race

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I see no value in making 'dispatcher' atomic:

case 1: if there is an ordering between setting and reading it, then there is no need for atomic;
case 2: if there is no ordering then /even with atomic/ the delete can see the unset value and the test is broken.

AFAICS the move of 'trigger()' ensures we have case 1 and atomic<> is therefore unnecessary.

In fact atomic<> is confusing: As Daniel says it implies we have case 2 (when it ensures is that the value loaded is "safe").

review: Needs Fixing

« Back to merge proposal