Scope is to get the build green on rspec3 while fixing the race on cache[mod]. I think a mutex is another option, but adding a mutex just to force sequenctial evaluation of the default block body against an idempotent write into a cache is overkill.
Lifting the lvar in the outer scope has IMO the same semantics.
Mutant passes with this changes and does not trigger that race anymore.
@dkubb Ready for review.
Scope is to get the build green on rspec3 while fixing the race on
cache[mod]
. I think a mutex is another option, but adding a mutex just to force sequenctial evaluation of the default block body against an idempotent write into a cache is overkill.Lifting the lvar in the outer scope has IMO the same semantics.
Mutant passes with this changes and does not trigger that race anymore.