jugyo/earthquake — pull request #150 by authorNari (2013-07-10 02:53:47+00:00)
Title: Output.insert should be exclueded

$stdout is swaped in Output.insert, but it's a shared data of all threads.
(https://github.com/jugyo/earthquake/blob/master/lib/earthquake/output.rb#L53-L63)
Output.insert may be called from multi-threads at same time.
For example, Core.error calls Output.insert and it's called from Core.async.
https://github.com/jugyo/earthquake/blob/master/lib/earthquake/core.rb#L251-L256
https://github.com/jugyo/earthquake/blob/master/lib/earthquake/core.rb#L245