Skip to content

Commit

Permalink
Merge e98a6ec into 046e52a
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng authored Nov 3, 2023
2 parents 046e52a + e98a6ec commit 709228b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/framework/src/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -2531,21 +2531,22 @@ long celix_framework_scheduleEvent(celix_framework_t* fw,
return -1L; //error logged by celix_scheduledEvent_create
}

long id = celix_scheduledEvent_getId(event);
fw_log(fw->logger,
CELIX_LOG_LEVEL_DEBUG,
"Added scheduled event '%s' (id=%li) for bundle '%s' (id=%li).",
celix_scheduledEvent_getName(event),
celix_scheduledEvent_getId(event),
id,
celix_bundle_getSymbolicName(bndEntry->bnd),
bndId);
celix_framework_bundleEntry_decreaseUseCount(bndEntry);

celixThreadMutex_lock(&fw->dispatcher.mutex);
celix_longHashMap_put(fw->dispatcher.scheduledEvents, celix_scheduledEvent_getId(event), event);
celix_longHashMap_put(fw->dispatcher.scheduledEvents, id, event);
celixThreadCondition_broadcast(&fw->dispatcher.cond); //notify dispatcher thread for newly added scheduled event
celixThreadMutex_unlock(&fw->dispatcher.mutex);

return celix_scheduledEvent_getId(event);
return id;
}

celix_status_t celix_framework_wakeupScheduledEvent(celix_framework_t* fw, long scheduledEventId) {
Expand Down

0 comments on commit 709228b

Please sign in to comment.