stop
mach::App::stop
Stops the application.
Description
Section titled “Description”Stops the application and shuts down the HTTP server.
Syntax
Section titled “Syntax”void stop();Postconditions
Section titled “Postconditions”The application has begun shutting down. No new work will be accepted.
Remarks
Section titled “Remarks”- Requests a graceful shutdown of the application.
- Calling this function before
run(), after the application has already stopped, or multiple times is safe and has no effect.
Thread Safety
Section titled “Thread Safety”This function is thread-safe and may be called from another thread while the application is running.
Example
Section titled “Example”// Called from another thread or a shutdown handler.app.stop();See Also
Section titled “See Also”| Name | Description |
|---|---|
run |
Starts the application. |