stop

View as MarkdownOpen in Claude

Sets the internal _running flag to False.

This method does not stop a running Uvicorn server. serve() calls uvicorn.run(), which blocks in its own event loop and never checks _running. To stop the server, send a SIGINT or SIGTERM signal to the process instead.

Returns

None

Example

1from signalwire.core.swml_service import SWMLService
2
3service = SWMLService(name="my-service")
4
5# In a signal handler or shutdown hook:
6service.stop()