Github user bgedik commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1196#discussion_r102025490
--- 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 --
Thanks, but for a message like {{"TNonblockingServer: IO thread #0 run()
done!"}} is there any kind of metadata that tells me if this is a info message
or a warning/error message. It seems to be being output without any information
attached to it. That makes it hard to filter the messages that we consider
unnecessary.
---
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.
---