libcamera: bound_method: Support connection types
Support all connection types in the BoundMethodBase::activePack() method. To support this, add a semaphore to the InvokeMessage to signal delivery. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -15,6 +15,7 @@ namespace libcamera {
|
||||
|
||||
class BoundMethodBase;
|
||||
class Object;
|
||||
class Semaphore;
|
||||
class Thread;
|
||||
|
||||
class Message
|
||||
@@ -48,14 +49,18 @@ class InvokeMessage : public Message
|
||||
{
|
||||
public:
|
||||
InvokeMessage(BoundMethodBase *method, void *pack,
|
||||
Semaphore *semaphore = nullptr,
|
||||
bool deleteMethod = false);
|
||||
~InvokeMessage();
|
||||
|
||||
Semaphore *semaphore() const { return semaphore_; }
|
||||
|
||||
void invoke();
|
||||
|
||||
private:
|
||||
BoundMethodBase *method_;
|
||||
void *pack_;
|
||||
Semaphore *semaphore_;
|
||||
bool deleteMethod_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user