Commit 309771a
chore: remove unused mutex from the deque request scheduler (#397)
The deque-backed global request scheduler (FIFO) is a Chase-Lev
work-stealing deque used as single-producer / multi-consumer: only the
listener thread pushes (the owner end) and worker threads only steal (the
lock-free opposite end, coordinated by a CAS). deque_pop -- the other
owner operation -- is never used, so the multi-owner case the deque
comments warn about does not arise, and no lock is required.
global_request_scheduler_deque_mutex (carrying a "Should this be used???"
TODO) was never locked anywhere -- dead code. Remove it and document why
the structure is safe without a lock.
No functional change. Verified: builds; FIFO serves 20,000/20,000
requests as 200s with no errors.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4e53994 commit 309771a
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
13 | | - | |
14 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
0 commit comments