Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout cancel #1069

Merged
merged 2 commits into from
Jul 19, 2024
Merged

Timeout cancel #1069

merged 2 commits into from
Jul 19, 2024

Conversation

davidplowman
Copy link
Collaborator

2 commits

One is actually the timeout and cancel functionality.

The other is an improvement to the way we open the camera manager, just so as to produce less console chatter.

Make sure we do it only once, even when Picamera2.global_camera_info()
is called before opening a camera.

Signed-off-by: David Plowman <[email protected]>
Add a cancel_all_and_flush() function to clear out and cancel any jobs
on the camera queue. This will allow the stop() function to operate
when it would otherwise have got queued behind a job that had hung.

Trying to access the result of any such cancelled job will result in a
CancelledError.

The wait parameter of all the "capture" functions is extended so that
you can also supply an integer, being the time in seconds after which
it will produce a TimeoutError if it has not finished.

Signed-off-by: David Plowman <[email protected]>
@davidplowman davidplowman merged commit ddd2ca3 into raspberrypi:next Jul 19, 2024
4 checks passed
@davidplowman davidplowman deleted the timeout-cancel branch October 30, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant