|
|
@ -146,7 +146,7 @@ module GRPC |
|
|
|
def remove_current_thread |
|
|
|
def remove_current_thread |
|
|
|
@stop_mutex.synchronize do |
|
|
|
@stop_mutex.synchronize do |
|
|
|
@workers.delete(Thread.current) |
|
|
|
@workers.delete(Thread.current) |
|
|
|
@stop_cond.signal if @workers.size == 0 |
|
|
|
@stop_cond.signal if @workers.size.zero? |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -364,7 +364,7 @@ module GRPC |
|
|
|
# - #running? returns true after this is called, until #stop cause the |
|
|
|
# - #running? returns true after this is called, until #stop cause the |
|
|
|
# the server to stop. |
|
|
|
# the server to stop. |
|
|
|
def run |
|
|
|
def run |
|
|
|
if rpc_descs.size == 0 |
|
|
|
if rpc_descs.size.zero? |
|
|
|
logger.warn('did not run as no services were present') |
|
|
|
logger.warn('did not run as no services were present') |
|
|
|
return |
|
|
|
return |
|
|
|
end |
|
|
|
end |
|
|
@ -455,7 +455,7 @@ module GRPC |
|
|
|
unless cls.include?(GenericService) |
|
|
|
unless cls.include?(GenericService) |
|
|
|
fail "#{cls} must 'include GenericService'" |
|
|
|
fail "#{cls} must 'include GenericService'" |
|
|
|
end |
|
|
|
end |
|
|
|
if cls.rpc_descs.size == 0 |
|
|
|
if cls.rpc_descs.size.zero? |
|
|
|
fail "#{cls} should specify some rpc descriptions" |
|
|
|
fail "#{cls} should specify some rpc descriptions" |
|
|
|
end |
|
|
|
end |
|
|
|
cls.assert_rpc_descs_have_methods |
|
|
|
cls.assert_rpc_descs_have_methods |
|
|
|