From bf3dbaece91e7f9be00923a225a62a918bf71f5b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 19 Aug 2022 14:16:15 +0300 Subject: py: Switch to non-blocking eventfd Blocking wait can be easily implemented on top in Python, so rather than supporting only blocking reads, or supporting both non-blocking and blocking reads, let's support only non-blocking reads. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/py/examples/simple-continuous-capture.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/py/examples/simple-continuous-capture.py') diff --git a/src/py/examples/simple-continuous-capture.py b/src/py/examples/simple-continuous-capture.py index fe78a2dd..26a8060b 100755 --- a/src/py/examples/simple-continuous-capture.py +++ b/src/py/examples/simple-continuous-capture.py @@ -88,8 +88,9 @@ class CaptureContext: camera_contexts: list[CameraCaptureContext] = [] def handle_camera_event(self): - # cm.get_ready_requests() will not block here, as we know there is an event - # to read. + # cm.get_ready_requests() returns the ready requests, which in our case + # should almost always return a single Request, but in some cases there + # could be multiple or none. reqs = self.cm.get_ready_requests() -- cgit v1.2.1