Method: GRPC::RpcServer#run
- Defined in:
- src/ruby/lib/grpc/generic/rpc_server.rb
#run ⇒ Object Also known as: run_till_terminated
runs the server
-
if no rpc_descs are registered, this exits immediately, otherwise it continues running permanently and does not return until program exit.
-
#running? returns true after this is called, until #stop cause the the server to stop.
351 352 353 354 355 356 357 358 359 360 |
# File 'src/ruby/lib/grpc/generic/rpc_server.rb', line 351 def run @run_mutex.synchronize do fail 'cannot run without registering services' if rpc_descs.size.zero? @pool.start @server.start transition_running_state(:running) @run_cond.broadcast end loop_handle_server_calls end |