MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / callback_batch_run

Function callback_batch_run

src/daemon/daemon.c:232–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static void callback_batch_run(cbm_daemon_coordinator_t *coordinator,
233 cbm_daemon_callback_batch_t *batch) {
234 cbm_daemon_job_t *job = batch->jobs;
235 while (job) {
236 cbm_daemon_job_t *next = job->action_next;
237 batch->cancel_job(job->project_key, batch->context);
238
239 cbm_mutex_lock(&coordinator->mutex);
240 coordinator->callback_count--;
241 job->cancel_callback_inflight = false;
242 bool detached = job->detached;
243 cbm_mutex_unlock(&coordinator->mutex);
244 if (detached) {
245 free_job(job);
246 }
247 job = next;
248 }
249
250 cbm_daemon_watch_t *watch = batch->watches;
251 while (watch) {
252 cbm_daemon_watch_t *next = watch->action_next;
253 if (batch->release_watch) {
254 batch->release_watch(watch->project_key, batch->context);
255 cbm_mutex_lock(&coordinator->mutex);
256 coordinator->callback_count--;
257 cbm_mutex_unlock(&coordinator->mutex);
258 }
259 free_watch(watch);
260 watch = next;
261 }
262}
263
264static void release_client_resources_locked(cbm_daemon_coordinator_t *coordinator,
265 cbm_daemon_client_id_t client_id,

Callers 4

cbm_daemon_expire_leasesFunction · 0.85

Calls 4

cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85
free_jobFunction · 0.85
free_watchFunction · 0.85

Tested by

no test coverage detected