Closed authorNari closed 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
$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