jugyo / earthquake

Twitter terminal client with streaming API support.
MIT License
661 stars 94 forks source link

Output.insert should be exclueded #150

Closed authorNari closed 11 years ago

authorNari commented 11 years ago

$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