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

Function settings_busy_wait

src/cli/runtime_settings.c:217–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215enum { SETTINGS_BUSY_TIMEOUT_MS = 3000, SETTINGS_BUSY_STEP_MS = 10 };
216
217static int settings_busy_wait(void *context, int attempts) {
218 (void)context;
219 if (attempts == 0)
220 cbm_log_warn("config_db.busy_wait", "action", "waiting for a settings writer");
221 if ((long long)attempts * SETTINGS_BUSY_STEP_MS >= SETTINGS_BUSY_TIMEOUT_MS)
222 return 0;
223 sqlite3_sleep(SETTINGS_BUSY_STEP_MS);
224 return 1;
225}
226
227void cbm_runtime_settings_wait_for_writers(sqlite3 *db) {
228 if (db)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected