Skip to content

Commit

Permalink
fix(OphydObject): add destroyed attribute to OphydObject
Browse files Browse the repository at this point in the history
  • Loading branch information
wakonig committed Jul 2, 2024
1 parent 1f8b64f commit 9e06a94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ophyd/ophydobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def __init__(self, *, name=None, attr_name="", parent=None, labels=None, kind=No
raise ValueError("name must be a string.")
self._name = name
self._parent = parent
self._destroyed = False

# dictionary of wrapped callbacks
self._callbacks = {k: {} for k in self.subscriptions}
Expand Down Expand Up @@ -345,6 +346,7 @@ def connected(self):
def destroy(self):
"""Disconnect the object from the underlying control layer"""
self.unsubscribe_all()
self._destroyed = True

@property
def parent(self):
Expand Down

0 comments on commit 9e06a94

Please sign in to comment.