Github user bgedik commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1196#discussion_r102023002
--- 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 --
Is there any way to control the outputting of these messages? When we run
with TNonblockingServer, we get these output. I couldn't find a way to mask
them.
---
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.
---