PengZheng commented on code in PR #729:
URL: https://github.com/apache/celix/pull/729#discussion_r1498738702


##########
libs/framework/src/bundle_context.c:
##########
@@ -966,6 +988,11 @@ static void 
celix_bundleContext_waitForTrackerInternal(celix_bundle_context_t* c
         } else {
             celix_framework_waitForGenericEvent(ctx->framework, eventId);
         }
+    } else if (waitForStart) {
+        fw_log(ctx->framework->logger,
+               CELIX_LOG_LEVEL_ERROR,
+               "Cannot wait for tracker, no tracker with id %li found'",
+               trackerId);

Review Comment:
   We may need a test case to wait for non-existing tracker.



##########
libs/framework/src/bundle_context.c:
##########
@@ -930,32 +946,38 @@ static void 
celix_bundleContext_waitForTrackerInternal(celix_bundle_context_t* c
         return;
     }
 
+    if (celix_framework_isCurrentThreadTheEventLoop(ctx->framework)) {
+        fw_log(ctx->framework->logger,
+               CELIX_LOG_LEVEL_WARNING,
+               "Cannot wait for tracker on the event loop thread. This can 
cause a deadlock. "
+               "Ignoring call.");

Review Comment:
   A return is missing, which will trigger assertion failure and crash the 
program.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to