Sha256: 36bfd2710697932038f782b1830e8fda5a34be92fdaed2a0ea43b8889930b117
Contents?: true
Size: 798 Bytes
Versions: 8
Compression:
Stored size: 798 Bytes
Contents
require 'tribe' require 'eventmachine' require 'tribe_em/version' require 'tribe_em/actor_proxy' require 'tribe_em/connection' require 'tribe_em/dedicated_connection' require 'tribe_em/tcp_server' module Tribe module EM def self.start @em_thread = Thread.new do ::EM.run do ::EM.kqueue = true if ::EM.kqueue? ::EM.epoll = true if ::EM.epoll? ::EM.error_handler do |e| puts "EXCEPTION: #{e.message}\n#{e.backtrace.join("\n")}--" end end end return nil end def self.stop ::EM.stop_event_loop @em_thread.join if @em_thread @em_thread = nil return nil end def self.running? return ::EM.reactor_running? end end end # Force EM to run. Tribe::EM.start
Version data entries
8 entries across 8 versions & 1 rubygems