AsyncFw 1.2
Async Framework is c++ runtime with timers, poll notifiers, sockets, coroutines, etc.
 
Loading...
Searching...
No Matches
AsyncFw::MainThread Class Reference

The MainThread class. More...

#include <AsyncFw/MainThread>

Inheritance diagram for AsyncFw::MainThread:
[legend]
Collaboration diagram for AsyncFw::MainThread:
[legend]

Static Public Member Functions

template<typename M>
static void setExitTask (M method)
 
static int exec ()
 
static void exit ()
 
static void exit (int code)
 
static void quit ()
 

Detailed Description

The MainThread class.

Examlpe:

#include <core/LogStream.h>
#include <MainThread.h>
int main(int argc, char *argv[]) {
AsyncFw::Thread::currentThread()->invokeMethod([]() { AsyncFw::MainThread::exit(123); });
logDebug() << "Start Application";
int ret = AsyncFw::MainThread::exec();
logDebug() << "End Application" << ret;
return ret;
}

The documentation for this class was generated from the following file: