Skip to content

Commit

Permalink
camera queue block= false parameter added
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuhong committed Aug 23, 2021
1 parent 6940540 commit 0babc5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sashimi/processes/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ def get_frame(self):
self.saver_queue.clear()
while self.wait_signal.is_set():
try:
_ = self.camera_queue.get(timeout=TIMEOUT_S)
_ = self.camera_queue.get(timeout=TIMEOUT_S, block=False)
except Empty:
pass
self.logger.log_message("wait over")
self.i_plane = 0
try:
current_frame = self.camera_queue.get(timeout=TIMEOUT_S)
current_frame = self.camera_queue.get(timeout=TIMEOUT_S, block=False)
self.process_frame(current_frame)
except Empty:
pass
Expand Down
2 changes: 1 addition & 1 deletion sashimi/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_last_parameters(parameter_queue, timeout=0.0001):
params = None
while True:
try:
params = parameter_queue.get(timeout=timeout)
params = parameter_queue.get(timeout=timeout, block=False)
except Empty:
break
return params
Expand Down

0 comments on commit 0babc5e

Please sign in to comment.