Log Message: |
[thrift] Add optional callback inside of serve()
Summary: If enabled, the callback function will be run after the listening socket is opened and the event loop initialized, just prior to calling event_loop()
This is handy if you want to defer some of your initialization until after the socket is open -- allowing clients to connect, but not processing requests until the initialization is complete. I use this in the Synapse tablet server to minimize the communications interruption that happens during a tablet split (replaying commit logs after opening the listening socket).
Review: mcslee
Test Plan: compiled it into Synapse's tablet server
Revert: ok
|