# development


03/27/2017, 6:00 PM
any thoughts on the best pattern to use in rust for threadsafe interior mutability (
self.x = y
)? turns out that with v2 + multiple tasks that include clean-all (
./pants clean-all test blah
) the snapshot dir used used by the engine is ofc blown away. so was going to check that inline when the “property” method is called and reinitialize the TempDir inline if needed. a cheaper hack might just be to recreate its original dir, which should be safe as the random dir path collision would be ~inprobable - but not entirely impossible due to not reinvoking the TempDir creation logic.