From 680360dfe6d25b2c0126ac6baa9b9cb6d4d33112 Mon Sep 17 00:00:00 2001 From: Aster Seker Date: Wed, 23 Sep 2026 23:56:30 +0300 Subject: [PATCH] docs(executor): clarify resize completion contract Document that hot queue resize waits on the completion frontier for submissions accepted before the resize barrier. Keep the public wait and active-task semantics distinct from the internal resize protocol. --- docs/TaskExecutor.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/TaskExecutor.md b/docs/TaskExecutor.md index 91bf6f3..6348ab9 100644 --- a/docs/TaskExecutor.md +++ b/docs/TaskExecutor.md @@ -86,7 +86,8 @@ application. 1. `m_resizing` is set to `true` with release semantics. 2. Producers that already entered `add_task()` are allowed to finish or the resize is abandoned after the bounded resize deadline. -3. `wait()` drains the queue and ensures `m_active_tasks == 0`. +3. The completion frontier waits until all submissions accepted before the + resize barrier have completed or been rejected. 4. The worker is stopped by setting `m_stop_flag`, notifying sleepers, and joining the thread so it no longer touches `m_mpsc_queue`. 5. In a single thread the ring is rebuilt with the new capacity. The resize