Value | Meaning |
---|---|
afterQueuedRequestsComplete | Stops accepting new requests, but lets ones already in the queue start and complete before exiting. |
afterCurrentRequestsComplete | Finishes requests already started their handlers, but drops any others in the queue. Streaming handlers should cooperate and exit gracefully, but if they don't, it will continue waiting for them. |
cancelStreamingRequestsEarly | Partial response writes will throw an exception, cancelling any streaming response, but complete writes will continue to process. Request handlers that respect the stop token will also gracefully cancel. |
cancelAllRequestsEarly | All writes will throw. |
forciblyTerminate | Use OS facilities to forcibly kill running threads. The server process will be in an undefined state after this call (if this call ever returns). |
The stop function sets a flag that request handlers can (and should) check periodically. If a handler doesn't respond to this flag, the library will force the issue. This determines when and how the issue will be forced.