Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1196#discussion_r102025979
--- Diff: lib/cpp/src/thrift/server/TNonblockingServer.cpp ---
@@ -1566,24 +1562,26 @@ void
TNonblockingIOThread::setCurrentThreadHighPriority(bool value) {
}
void TNonblockingIOThread::run() {
- if (eventBase_ == NULL)
+ if (eventBase_ == NULL) {
registerEvents();
-
- GlobalOutput.printf("TNonblockingServer: IO thread #%d entering
loop...", number_);
-
+ }
if (useHighPriority_) {
setCurrentThreadHighPriority(true);
}
- // Run libevent engine, never returns, invokes calls to eventHandler
- event_base_loop(eventBase_, 0);
+ if (eventBase_ != NULL)
+ {
+ GlobalOutput.printf("TNonblockingServer: IO thread #%d entering
loop...", number_);
+ // Run libevent engine, never returns, invokes calls to eventHandler
+ event_base_loop(eventBase_, 0);
- if (useHighPriority_) {
- setCurrentThreadHighPriority(false);
- }
+ if (useHighPriority_) {
+ setCurrentThreadHighPriority(false);
+ }
- // cleans up our registered events
- cleanupEvents();
+ // cleans up our registered events
+ cleanupEvents();
+ }
GlobalOutput.printf("TNonblockingServer: IO thread #%d run() done!",
number_);
--- End diff --
All of these messages were already in the implementation and they do not
appear to have any discrimination as to the severity. My assumption is they
are all meant for "printf style debugging".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---