Sha256: 318d93cc5780b05c21e192f34bde6f707f62471b624b05c316ab5c41841a8b2d

Contents?: true

Size: 279 Bytes

Versions: 21

Compression:

Stored size: 279 Bytes

Contents

# encoding: utf-8

require "amqp/ext/em"

module AMQP
  # @deprecated
  # @private
  def self.fork(workers)
    EM.fork(workers) do
      # clean up globals in the fork
      Thread.current[:mq] = nil
      AMQP.instance_variable_set('@conn', nil)

      yield
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
amqp-0.9.10 lib/amqp/deprecated/fork.rb
amqp-0.9.9 lib/amqp/deprecated/fork.rb
amqp-0.9.8 lib/amqp/deprecated/fork.rb
amqp-0.9.7 lib/amqp/deprecated/fork.rb
amqp-0.9.6 lib/amqp/deprecated/fork.rb
amqp-0.9.5 lib/amqp/deprecated/fork.rb
amqp-0.9.4 lib/amqp/deprecated/fork.rb
amqp-0.9.3 lib/amqp/deprecated/fork.rb
amqp-0.9.2 lib/amqp/deprecated/fork.rb
amqp-0.9.1 lib/amqp/deprecated/fork.rb
amqp-0.9.0 lib/amqp/deprecated/fork.rb
amqp-0.9.0.pre3 lib/amqp/deprecated/fork.rb
amqp-0.9.0.pre2 lib/amqp/deprecated/fork.rb
amqp-0.9.0.pre1 lib/amqp/deprecated/fork.rb
amqp-0.8.4 lib/amqp/deprecated/fork.rb
amqp-0.8.3 lib/amqp/deprecated/fork.rb
amqp-0.8.2 lib/amqp/deprecated/fork.rb
amqp-0.8.1 lib/amqp/deprecated/fork.rb
amqp-0.8.0 lib/amqp/deprecated/fork.rb
amqp-0.8.0.rc15 lib/amqp/deprecated/fork.rb