diff --git a/pysyncobj/syncobj.py b/pysyncobj/syncobj.py index ce93ae0..2a43c7a 100644 --- a/pysyncobj/syncobj.py +++ b/pysyncobj/syncobj.py @@ -291,6 +291,21 @@ def destroy(self): else: self._doDestroy() + def tick_thread_alive(self): + """ + Check if the tick thread is alive. + """ + if self.__thread and self.__thread.is_alive(): + return True + return False + + def destroy_synchronous(self): + """ + Correctly destroy SyncObj. Stop autoTickThread, close connections, etc. and ensure the threads are gone. + """ + self.destroy() + self.__thread.join() + def waitReady(self): """ Waits until the transport is ready for operation.