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

Function cbm_watcher_stop

src/watcher/watcher.c:1398–1411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396}
1397
1398void cbm_watcher_stop(cbm_watcher_t *w) {
1399 if (w) {
1400 atomic_store_explicit(&w->stopped, 1, memory_order_release);
1401 cbm_mutex_lock(&w->projects_lock);
1402 cbm_ht_foreach(w->projects, cancel_active_git_entry, NULL);
1403 for (int i = 0; i < w->pending_free_count; i++) {
1404 project_state_t *state = w->pending_free[i];
1405 if (state && state->active_git) {
1406 (void)cbm_subprocess_request_cancel(state->active_git);
1407 }
1408 }
1409 cbm_mutex_unlock(&w->projects_lock);
1410 }
1411}
1412
1413int cbm_watcher_run(cbm_watcher_t *w, int base_interval_ms) {
1414 if (!w) {

Callers 4

host_background_stopFunction · 0.85
test_watcher.cFile · 0.85

Calls 4

cbm_mutex_lockFunction · 0.85
cbm_ht_foreachFunction · 0.85
cbm_mutex_unlockFunction · 0.85

Tested by 1