added join method in TelegramClient

This commit is contained in:
Giovanni Cardamone 2018-01-13 14:54:16 +01:00
parent 0d429f55c5
commit becee2b0ac

View File

@ -1403,3 +1403,13 @@ class TelegramClient(TelegramBareClient):
)
# endregion
def join (self):
"""
Join all the threads spwaned for read;
if there is no thread, join will return
"""
# If there is no thread to join, just return
if self._recv_thread is None: return
else: self._recv_thread.join()