Explicitally acquire camera lock
This commit is contained in:
parent
5c86c7f350
commit
cb441201c6
1 changed files with 11 additions and 9 deletions
|
|
@ -114,6 +114,8 @@ class ListAPI(MicroscopeView):
|
||||||
else:
|
else:
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
|
# Explicitally acquire lock (prevents empty files being created if lock is unavailable)
|
||||||
|
with self.microscope.camera.lock:
|
||||||
output = self.microscope.camera.new_image(
|
output = self.microscope.camera.new_image(
|
||||||
write_to_file=True,
|
write_to_file=True,
|
||||||
temporary=temporary,
|
temporary=temporary,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue