libcamera
v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
|
Message queue support. More...
Go to the source code of this file.
Classes | |
class | libcamera::Message |
A message that can be posted to a Thread. More... | |
class | libcamera::InvokeMessage |
A message carrying a method invocation across threads. More... | |
Namespaces | |
libcamera | |
Top-level libcamera namespace. | |
Message queue support.
The messaging API enables inter-thread communication through message posting. Messages can be sent from any thread to any recipient deriving from the Object class.
To post a message, the sender allocates it dynamically as instance of a class derived from Message. It then posts the message to an Object recipient through Object::postMessage(). Message ownership is passed to the object, thus the message shall not store any temporary data.
The message is delivered in the context of the object's thread, through the Object::message() virtual function. After delivery the message is automatically deleted.