diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-08-19 14:16:15 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-08-19 15:44:28 +0300 |
commit | bf3dbaece91e7f9be00923a225a62a918bf71f5b (patch) | |
tree | e22642e0d928e5827a781cea7d23743657b686b1 /src/py/examples/simple-cam.py | |
parent | de7f1aa591881e112b67ec4f6507a6079b226089 (diff) |
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 <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/py/examples/simple-cam.py')
-rwxr-xr-x | src/py/examples/simple-cam.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/py/examples/simple-cam.py b/src/py/examples/simple-cam.py index 2b81bb65..b3e97ca7 100755 --- a/src/py/examples/simple-cam.py +++ b/src/py/examples/simple-cam.py @@ -19,8 +19,9 @@ TIMEOUT_SEC = 3 def handle_camera_event(cm): - # 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 = cm.get_ready_requests() |