lib/bunny/channel_id_allocator.rb in bunny-0.10.8 vs lib/bunny/channel_id_allocator.rb in bunny-1.0.0.pre1

- old
+ new

@@ -1,7 +1,6 @@ require "thread" -require "monitor" require "amq/int_allocator" module Bunny # Bitset-based channel id allocator. When channels are closed, # ids are released back to the pool. @@ -17,10 +16,10 @@ # # @param [Integer] max_channel Max allowed channel id def initialize(max_channel = ((1 << 16) - 1)) @allocator = AMQ::IntAllocator.new(1, max_channel) - @mutex = Monitor.new + @mutex = Mutex.new end # Returns next available channel id. This method is thread safe. #