change/timecop — comment on commit eef182807d9f7d1d26d789ab7a3d73f0862d11cd
File: lib/timecop/timecop.rb line 94
By deadlyicon:

I think we need to move this file up in the logic chain. I see a possible edge case. If two processes are trying to modify the timecop stash at the same time this will prevent them both from writing at the same time but as soon as the first is done writing the second will overwrite those changes with its understanding of the stack at the time.

If we move the lock up, or maybe use a semaphore, that forces stack reads to check for the lock want wait to read until after all writes are done this should prevent this edge case.

thoughts?