Method ServiceApp():stop() Foundation

Service received "stop" control request.

Syntax
:stop() --> self
Return

The class method :stop() returns the class object.

Description

This callback is executed when a "stop" request is sent by a service control application. The service's state then changes to "stopped" and the service is required to terminate its execution in its class method :main().

The :stop() callback method is mandatory and must be used to implement suitable behavior for stopping the task performed by the service. To do this, the method must be overwritten in a user-defined class derived from ServiceApp and has to signal the code executing in the :main() callback to terminate, for example, by setting an internal flag value.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.