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

Function cbm_watcher_stop

src/watcher/watcher.c:1780–1793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1778}
1779
1780void cbm_watcher_stop(cbm_watcher_t *w) {
1781 if (w) {
1782 atomic_store_explicit(&w->stopped, 1, memory_order_release);
1783 cbm_mutex_lock(&w->projects_lock);
1784 cbm_ht_foreach(w->projects, cancel_active_git_entry, NULL);
1785 for (int i = 0; i < w->pending_free_count; i++) {
1786 project_state_t *state = w->pending_free[i];
1787 if (state && state->active_git) {
1788 (void)cbm_subprocess_request_cancel(state->active_git);
1789 }
1790 }
1791 cbm_mutex_unlock(&w->projects_lock);
1792 }
1793}
1794
1795int cbm_watcher_run(cbm_watcher_t *w, int base_interval_ms) {
1796 if (!w) {

Callers 5

host_background_stopFunction · 0.85
test_watcher.cFile · 0.85
test_httpd.cFile · 0.85

Calls 4

cbm_mutex_lockFunction · 0.85
cbm_ht_foreachFunction · 0.85
cbm_mutex_unlockFunction · 0.85

Tested by 1