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

Function racing_sweep_thread

tests/test_pipeline.c:6117–6129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6115}
6116
6117static void *racing_sweep_thread(void *arg) {
6118 racing_sweep_arg_t *a = (racing_sweep_arg_t *)arg;
6119 cbm_pipeline_t *p = cbm_pipeline_new(a->tmp_dir, a->db_path, CBM_MODE_FULL);
6120 if (p) {
6121 /* Its own sweep_orphan_stages() runs at the very start, before this
6122 * run mints its own stage -- exactly like the first run's. Cancel
6123 * immediately: this run must reach the sweep and nothing past it. */
6124 cbm_pipeline_cancel(p);
6125 (void)cbm_pipeline_run(p);
6126 cbm_pipeline_free(p);
6127 }
6128 return NULL;
6129}
6130
6131/* Fired from inside the FIRST run's create_staging_path(), the instant its
6132 * stage main file exists (under the fix, with its sidecar lock already held;

Callers

nothing calls this directly

Calls 4

cbm_pipeline_newFunction · 0.85
cbm_pipeline_cancelFunction · 0.85
cbm_pipeline_runFunction · 0.85
cbm_pipeline_freeFunction · 0.85

Tested by

no test coverage detected