Method: #wakey_thread

Defined in:
src/ruby/spec/generic/client_stub_spec.rb

#wakey_thread(&blk) ⇒ Object


19
20
21
22
23
24
25
26
27
# File 'src/ruby/spec/generic/client_stub_spec.rb', line 19

def wakey_thread(&blk)
  n = GRPC::Notifier.new
  t = Thread.new do
    blk.call(n)
  end
  t.abort_on_exception = true
  n.wait
  t
end