libcamera::ThreadMain Class Reference

Thread wrapper for the main thread. More...

Inheritance diagram for libcamera::ThreadMain:

## Protected Member Functions

void | run () override
| Main method of the thread. More...
Protected Member Functions inherited from libcamera::Thread
int | exec ()
| Enter the event loop. More...

## Additional Inherited Members

Public Member Functions inherited from libcamera::Thread
| Thread ()
| Create a thread.
void | start ()
| Start the thread.
void | exit (int code=0)
| Stop the thread's event loop. More...
bool | wait (utils::duration duration=utils::duration::max())
| Wait for the thread to finish. More...
bool | isRunning ()
| Check if the thread is running. More...
EventDispatcher * | eventDispatcher ()
| Retrieve the event dispatcher. More...
void | setEventDispatcher (std::unique_ptr< EventDispatcher > dispatcher)
| Set the event dispatcher. More...
void | dispatchMessages ()
| Dispatch all posted messages for this thread.
Static Public Member Functions inherited from libcamera::Thread
static Thread * | current ()
| Retrieve the Thread instance for the current thread. More...
static pid_t | currentId ()
| Retrieve the ID of the current thread. More...
Public Attributes inherited from libcamera::Thread
Signal< Thread * > | finished
| Signal the end of thread execution.

## Detailed Description

Thread wrapper for the main thread.

## Member Function Documentation

## run()

void libcamera::ThreadMain::run | ( |  | ) |

inline override protected virtual

Main method of the thread.

When the thread is started with start(), it calls this method in the context of the new thread. The run() method can be overloaded to perform custom work. When this method returns the thread execution is stopped, and the finished signal is emitted.

The base implementation just calls exec().

Reimplemented from libcamera::Thread.

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

- src/libcamera/thread.cpp