libcamera: thread: Support timeout in wait() function
Add a parameter to the Thread::wait() function to wait with a timeout. The delay value utils::duration::max() waits forever. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
#include <libcamera/signal.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class EventDispatcher;
|
||||
@@ -33,7 +35,7 @@ public:
|
||||
|
||||
void start();
|
||||
void exit(int code = 0);
|
||||
void wait();
|
||||
bool wait(utils::duration duration = utils::duration::max());
|
||||
|
||||
bool isRunning();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user