feat: implement lock-free command queue and atomic state for thread safety

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 14:52:53 +00:00
parent 563380df66
commit 7b23c75dd1
6 changed files with 293 additions and 63 deletions

6
tui.c
View File

@@ -106,9 +106,9 @@ static void draw_grid(void) {
mvprintw(GRID_ROWS * CELL_HEIGHT + 2, 0,
"Quantize: %s | Threshold: %u | Transport: %s",
quantize_mode_to_string(g_engine->quantize_mode),
g_engine->quantize_threshold,
g_engine->transport.rolling ? "Rolling" : "Stopped");
quantize_mode_to_string((QuantizeMode)atomic_load(&g_engine->quantize_mode_atomic)),
(unsigned int)atomic_load(&g_engine->quantize_threshold_atomic),
atomic_load(&g_engine->transport_rolling) ? "Rolling" : "Stopped");
// Draw help if active
if (show_help) {