Skip to content

Commit

Permalink
gh-215: Remove all remaining scheduled events for an inactive dispatc…
Browse files Browse the repository at this point in the history
…her.
  • Loading branch information
PengZheng committed Jun 12, 2024
1 parent e07b2e8 commit d384c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/framework/src/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d384c86

Please sign in to comment.