Summary
The new mutex test (`insert_waits_for_mutex`) still uses `thread::sleep(50ms)` and `AtomicBool`, so the interleaving check can flake under load; no barrier/channel sync is used.
Required changes
Replace the sleep with a channel or barrier, assert the spawned thread has started, and keep the single-writer locking model explicit in docs/tests.
Affected areas
- `chutoro-core/src/hnsw/cpu/unit_tests.rs`
Acceptance criteria
- Test uses deterministic synchronisation instead of sleep.
- Single-writer locking model is documented alongside the test.
References
- PR: $pr_url
- Requested by: @$assignee
Summary
The new mutex test (`insert_waits_for_mutex`) still uses `thread::sleep(50ms)` and `AtomicBool`, so the interleaving check can flake under load; no barrier/channel sync is used.
Required changes
Replace the sleep with a channel or barrier, assert the spawned thread has started, and keep the single-writer locking model explicit in docs/tests.
Affected areas
Acceptance criteria
References