adapnex::core::Application

Synopsis

Declared in <adapnex/core/application.h>

class Application;

Member Functions

Name

Description

~Application [destructor] [virtual]

Destructor

Static Member Functions

Name

Description

AddStopHandler

Registers a handler to be invoked once when the application is stopping. Use this to unblock a task waiting inside a blocking Task::Update(), for example by calling TCPConnection::Close(). Handlers are invoked in reverse registration order. Tasks that need to release resources or write final values should override Task::TearDown() instead.

CreateCyclicTaskGroup

Creates a new cyclic task group. The task group will be executed cyclically according to the given interval making it suitable for scheduling real‐time control tasks. Use TaskGroup::CreateTask to add tasks to the task group.

CreateFreewheelingTaskGroup

Creates a freewheeling task group. The returned task group has no cyclic execution interval. Tasks are called repeatedly as quickly as possible. Freewheeling task groups are suitable for background tasks or for handling blocking operations outside the main control logic.

CreateUITaskGroup

Creates a task group that is run on the main thread. The returned task group is freewheeling and is run on the main thread of the application, as required by the user interface frameworks of some platforms. Only one such task group may be created.

IsStopping

Reports whether a shutdown has been requested, either via Application::Stop() or by the application receiving SIGINT or SIGTERM.

Stop

Requests a graceful shutdown of the application. No further update cycles are started. The cycle currently in progress runs to completion, including Task::PostUpdate(), after which Task::TearDown() is called for every task. The application exits once all task groups have finished.

Created with MrDocs