libcamera
v0.0.0
Supporting cameras in Linux since 2019
|
Thread wrapper for the main thread. More...
Protected Member Functions | |
void | run () override |
Main method of the thread. More... | |
![]() | |
int | exec () |
Enter the event loop. More... | |
Additional Inherited Members | |
![]() | |
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 Thread * | current () |
Retrieve the Thread instance for the current thread. More... | |
static pid_t | currentId () |
Retrieve the ID of the current thread. More... | |
![]() | |
Signal< Thread * > | finished |
Signal the end of thread execution. | |
Thread wrapper for the main thread.
|
inlineoverrideprotectedvirtual |
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.