PengZheng commented on code in PR #583: URL: https://github.com/apache/celix/pull/583#discussion_r1247864582
########## libs/framework/src/framework.c: ########## @@ -2391,14 +2535,29 @@ celix_array_list_t* celix_framework_listInstalledBundles(celix_framework_t* fram return celix_framework_listBundlesInternal(framework, false); } -void celix_framework_waitForEmptyEventQueue(celix_framework_t *fw) { +celix_status_t celix_framework_waitForEmptyEventQueueFor(celix_framework_t *fw, double periodInSeconds) { assert(!celix_framework_isCurrentThreadTheEventLoop(fw)); + celix_status_t status = CELIX_SUCCESS; + struct timespec absTimeout = celixThreadCondition_getDelayedTime(periodInSeconds); celixThreadMutex_lock(&fw->dispatcher.mutex); - while (fw->dispatcher.eventQueueSize > 0 || celix_arrayList_size(fw->dispatcher.dynamicEventQueue) > 0) { - celixThreadCondition_wait(&fw->dispatcher.cond, &fw->dispatcher.mutex); + while (celix_framework_eventQueueSize(fw) > 0) { Review Comment: Quick fix: https://github.com/apache/celix/pull/583/commits/d1caf178b236a8f5084fd7e096a191dc4146842b -- 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