Sha256: 8c763b845b528a7ca2e59430d3d6c0748eb381857cf3c08ef89c11e8947912ba
Contents?: true
Size: 531 Bytes
Versions: 8
Compression:
Stored size: 531 Bytes
Contents
module Protobuf module Rpc class EventedRunner def self.stop ::EventMachine.stop_event_loop if ::EventMachine.reactor_running? end def self.run(server) # Startup and run the rpc server ::EventMachine.schedule do ::EventMachine.start_server(server.host, server.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
8 entries across 8 versions & 1 rubygems