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 --- test/py/unittests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/py') diff --git a/test/py/unittests.py b/test/py/unittests.py index 9adc4337..6dea80fc 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -207,9 +207,16 @@ class SimpleCaptureMethods(CameraTesterBase): reqs = None gc.collect() + sel = selectors.DefaultSelector() + sel.register(cm.event_fd, selectors.EVENT_READ) + reqs = [] while True: + events = sel.select() + if not events: + continue + ready_reqs = cm.get_ready_requests() reqs += ready_reqs -- cgit v1.2.1