Sha256: 3c5250c72766fc144056106475afabf4a3441ecce277660d4b1d895e7f7b1979
Contents?: true
Size: 538 Bytes
Versions: 70
Compression:
Stored size: 538 Bytes
Contents
module Protobuf module Rpc class EventedRunner def self.stop ::EventMachine.stop_event_loop if ::EventMachine.reactor_running? end def self.run(options) # Startup and run the rpc server ::EventMachine.schedule do ::EventMachine.start_server(options[:host], options[:port], ::Protobuf::Rpc::Evented::Server) end # Join or start the reactor yield if block_given? ::EM.reactor_running? ? ::EM.reactor_thread.join : ::EM.run end end end end
Version data entries
70 entries across 70 versions & 1 rubygems