MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / request_stop

Method request_stop

server/src/server/http_server.h:266–268  ·  view source on GitHub ↗

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.)

Source from the content-addressed store, hash-verified

264
265namespace http_detail {
266
267inline 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.
271int flowkv_activation_threshold(const ServerConfig & config);

Callers 1

signal_handlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected