Sha256: 9cbc2000e65563f5c9ceb04727c2d9d2c89ecc05fe988dc5a76a01d888ffda44

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

# gem 'theatre', '>= 0.8.0'
# require 'theatre'

module Adhearsion
  module Events
    
    class << self
      
      def framework_theatre
        defined?(@@framework_theatre) ? @@framework_theatre : reinitialize_theatre!
      end
      
      def reinitialize_theatre!
        @@framework_theatre.gracefully_stop! if defined? @@framework_theatre
      rescue
        # Recover and reinitalize
      ensure
        # TODO: Extract number of threads to use from AHN_CONFIG
        @@framework_theatre = Theatre::Theatre.new
        return @@framework_theatre
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sant0sk1-adhearsion-0.7.999 lib/adhearsion/events_support.rb