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

Function wt_poll_until_count

tests/test_watcher.c:345–351  ·  view source on GitHub ↗

Wait-for-the-asserted-state (bounded) for REACH assertions only: reaching * a count is safe to wait for, because #937 guarantees an unchanged dirty * tree never increments — extra polls cannot overshoot a correct * implementation. NEVER use this for must-stay-quiet assertions; those are * genuinely about a fixed number of polls. */

Source from the content-addressed store, hash-verified

343 * implementation. NEVER use this for must-stay-quiet assertions; those are
344 * genuinely about a fixed number of polls. */
345static int wt_poll_until_count(cbm_watcher_t *w, const char *project, int expected, int max_polls) {
346 for (int i = 0; i < max_polls && index_call_count < expected; i++) {
347 cbm_watcher_touch(w, project);
348 cbm_watcher_poll_once(w);
349 }
350 return index_call_count;
351}
352
353TEST(watcher_poll_no_projects) {
354 cbm_store_t *store = cbm_store_open_memory();

Callers 1

test_watcher.cFile · 0.85

Calls 2

cbm_watcher_touchFunction · 0.85
cbm_watcher_poll_onceFunction · 0.85

Tested by

no test coverage detected