Updated to use CompositeLock

This commit is contained in:
Joel Collins 2019-01-24 14:05:25 +00:00
parent 27043240f3
commit 5c86c7f350

View file

@ -39,8 +39,10 @@ class Plugin(MicroscopePlugin):
print("Starting a long-running task...")
n_array = []
print("Acquiring camera and stage locks...")
with self.microscope.camera.lock, self.microscope.stage.lock:
#print("Acquiring camera and stage locks...")
#with self.microscope.camera.lock, self.microscope.stage.lock:
print("Acquiring composite microscope lock...")
with self.microscope.lock:
for _ in range(t_run):
n_array.append(random.random())
time.sleep(1)