Skip to content
Download

stop

mach::App::stop

Stops the application.

Stops the application and shuts down the HTTP server.

void stop();

The application has begun shutting down. No new work will be accepted.

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

This function is thread-safe and may be called from another thread while the application is running.

// Called from another thread or a shutdown handler.
app.stop();
Name Description
run Starts the application.