Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def update_view():
if event.is_set():
return
cur_time = time.time()
if cur_time < last_invalidate[0] + invalidate_interval:
return
last_invalidate[0] = cur_time
inf_volume.invalidate()
with self.viewer.txn() as s:
s.layers['points'].annotations = [
neuroglancer.PointAnnotation(id=repr(pos), point=pos) for pos in list(seen)
]