add additional entrypoint to TThreadPoolServer with easy exception handling
An additional method #serve_rescuable is added, which relays any exceptions
that happen in worker threads to the caller, where they can be handled
directly. 'retry' works too, allowing code like:
begin
server.rescuable_serve
rescue StandardError => e
puts "got exception: #{e.inspect}"
## do something
retry
end
The semantics of TThreadPoolServer#serve remain the same.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668891 13f79535-47bb-0310-9956-ffa450edef68
1 file changed