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

Function callback_batch_run

src/daemon/daemon.c:237–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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