Minor formatting changes
This commit is contained in:
parent
7ad1e7507f
commit
0c156128fc
2 changed files with 2 additions and 4 deletions
|
|
@ -107,7 +107,7 @@ class Microscope(object):
|
|||
logging.info("Attached dummy stage.")
|
||||
# If stage object has a lock
|
||||
if hasattr(self.stage, 'lock'):
|
||||
logging.info("Attaching {} to composite lock.".format(self.stage.lock))
|
||||
logging.info("Attaching lock {} to composite lock.".format(self.stage.lock))
|
||||
# Add the lock to the microscope composite lock
|
||||
self.lock.locks.append(self.stage.lock)
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,8 @@ 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 composite microscope lock...")
|
||||
with self.microscope.lock:
|
||||
with self.microscope.camera.lock, self.microscope.stage.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