guard/guard — pull request #678 by e2 (2014-11-26 16:59:37+00:00)
Title: avoid race when pry thread is already killed

Pry might have been killed during the Pry.start mutex, which means `@thread` could be nil just after it exists the synchronize block. Also, it uses a mutex to read the `@thread` value - just in case it gets reset by the kill block as well.