Sha256: 0d8e7374c7988a6fd2801efd4156193a6fb957d16b8e5a03d192ea6ac2c15947
Contents?: true
Size: 597 Bytes
Versions: 19
Compression:
Stored size: 597 Bytes
Contents
module Protobuf module Rpc class EventedRunner def self.register_signals # Noop 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 def self.stop ::EventMachine.stop_event_loop if ::EventMachine.reactor_running? end end end end
Version data entries
19 entries across 19 versions & 1 rubygems