From d384c8653570e54be521b24ec0902950288201bf Mon Sep 17 00:00:00 2001 From: PengZheng Date: Wed, 12 Jun 2024 17:32:27 +0800 Subject: [PATCH] gh-215: Remove all remaining scheduled events for an inactive dispatcher. --- libs/framework/src/framework.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c index 0c73f8afb..0b317c91a 100644 --- a/libs/framework/src/framework.c +++ b/libs/framework/src/framework.c @@ -1531,12 +1531,12 @@ static void *fw_eventDispatcher(void *fw) { } //not active anymore, extra runs for possible request leftovers + celix_framework_processScheduledEvents(framework); celixThreadMutex_lock(&framework->dispatcher.mutex); bool needExtraRun = celix_framework_eventQueueSize(fw) > 0; celixThreadMutex_unlock(&framework->dispatcher.mutex); while (needExtraRun) { fw_handleEvents(framework); - celix_framework_processScheduledEvents(framework); celixThreadMutex_lock(&framework->dispatcher.mutex); needExtraRun = celix_framework_eventQueueSize(fw) > 0; celixThreadMutex_unlock(&framework->dispatcher.mutex);