PengZheng commented on issue #587: URL: https://github.com/apache/celix/issues/587#issuecomment-1631845890
The following comment confused me: ```C //When removing the event celix_bundleContext_removeScheduledEvent(fw->getFrameworkBundleContext()->getCBundleContext(), eventId); //Then the log callback is called at least one more time with a warning log message, because remove //callback took too long //(note the logCount can be increased more than once, due to another processing thread) EXPECT_GE(logCount.load(), 2); ``` Why a time-consuming remove callback is guaranteed to trigger a warning, given that we never track the duration like we do in `celix_scheduledEvent_process`? ```C void celix_scheduledEvent_setRemoved(celix_scheduled_event_t* event) { if (event->removedCallback) { event->removedCallback(event->removedCallbackData); } celixThreadMutex_lock(&event->mutex); event->isRemoved = true; celixThreadCondition_broadcast(&event->cond); // for changed isRemoved celixThreadMutex_unlock(&event->mutex); } ``` -- 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