Updated to use CompositeLock
This commit is contained in:
parent
27043240f3
commit
5c86c7f350
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue