Async-signal-safe: only sets the stopping flag. The accept loop polls this flag on a short timeout, so it wakes regardless of which thread the signal is delivered to. (Closing listen_fd_ here is unsafe: on Linux a close() from another thread does not wake a blocked accept(), and it races the accept loop's own close on exit.)
| 264 | |
| 265 | namespace http_detail { |
| 266 | |
| 267 | inline constexpr int kFlowKvInertMinTokens = 512; |
| 268 | |
| 269 | // Small policy helpers kept outside HttpServer so model-free unit tests use |
| 270 | // the same decisions as the request path. |
| 271 | int flowkv_activation_threshold(const ServerConfig & config); |