Commit cb441201 authored by Joel Collins's avatar Joel Collins
Browse files

Explicitally acquire camera lock

parent 5c86c7f3
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@ class ListAPI(MicroscopeView):
            else:
                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(
                write_to_file=True,
                temporary=temporary,