grabber: timeout fixes

This commit is contained in:
Sébastien Bourdeauducq 2024-02-26 11:03:59 +08:00
parent 20d7604f87
commit 716d0f556d
2 changed files with 5 additions and 4 deletions

View File

@ -46,7 +46,7 @@ Highlights:
* MSYS2 packaging for Windows, which replaces Conda. Conda packages are still available to
support legacy installations, but may be removed in a future release.
* Experiments can now be submitted with revisions set to a branch / tag name instead of only git hashes.
* Grabber image input now has an optional timeout
* Grabber image input now has an optional timeout.
Breaking changes:

View File

@ -101,8 +101,8 @@ class Grabber:
ROI engines that produced output, an exception will be raised during
this call or the next.
If the timeout is reached before data is available, a RuntimeError is
raised.
If the timeout is reached before data is available, the exception
GrabberTimeoutException is raised.
:param timeout_mu: Timestamp at which a timeout will occur. Set to -1
(default) to disable timeout.
@ -120,5 +120,6 @@ class Grabber:
if roi_output == self.sentinel:
raise OutOfSyncException
if timestamp == -1:
raise GrabberTimeoutException("Timeout retrieving ROIs")
raise GrabberTimeoutException(
"Timeout retrieving ROIs (attempting to read more ROIs than enabled?)")
data[i] = roi_output