summaryrefslogtreecommitdiff
path: root/test/camera-sensor.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2024-11-08 23:34:15 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-11-11 14:18:02 +0000
commitdcb90f13cf79d909d04dacf2cfbd256a4744347f (patch)
treef9a528295e8f8613cd234bfd00851ea9b980d574 /test/camera-sensor.cpp
parent8fceb6ab1d51acfe2af39eb4f0209a767faca86d (diff)
CameraManager: Ensure we cleanup on failure
If the CameraManager fails to initialise at startup during CameraManager::Private::init(), then the run() function will prepare the thread for operations, but the thread will immediately close without executing any cleanup. This can leave instantiated objects such as the EventNotifier registered by the udev enumerator constructed in a thread which no longer exists. The destructor of those objects can then fire an assertion that they are being executed from an incorrect thread while performing their cleanup. Ensure that the failure path does not result in reporting thread ownership assertions by performing cleanup correctly on the CameraManager thread before it closes. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/camera-sensor.cpp')
0 files changed, 0 insertions, 0 deletions