From e84074094b2816ed6309745b82abfd5e47a06db2 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 28 Jun 2025 09:13:50 -0400 Subject: [PATCH] AI: Update threading model for augment code. --- .augment-guidelines | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.augment-guidelines b/.augment-guidelines index 749638553..84c81f95a 100644 --- a/.augment-guidelines +++ b/.augment-guidelines @@ -9,6 +9,16 @@ architecture: overview: | Core C++ streaming server with protocol implementations and media processing capabilities. Uses State Threads (ST) for high-performance coroutine-based networking. + + threading_model: | + Single-threaded, coroutine/goroutine-based application architecture: + - No traditional multi-threading issues (no thread switching, async race conditions) + - Uses coroutines/goroutines that cooperatively yield control + - Context switching occurs during async I/O operations + - Different context switch problems compared to multi-threaded applications: + * Coroutine state must be preserved across yields by async I/O operations + * Shared state can be modified between context switches + * Timing-dependent bugs related to when coroutines yield key_directories: - path: "trunk/src/"