Wrap the brokers array in a threadsafe array

References #50
This commit is contained in:
R. Tyler Croy 2014-10-28 18:13:20 -07:00
parent 7e8fbca79e
commit 6cbceead8b
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Hermann
# @param [Array] brokers An array of "host:port" strings for the brokers
def initialize(topic, brokers, opts={})
@topic = topic
@brokers = brokers
@brokers = ThreadSafe::Array.new(brokers)
if RUBY_PLATFORM == "java"
@internal = Hermann::Provider::JavaProducer.new(brokers, opts)
else