PYADPT-111: sync_handshake.py, now support single- and mutlithreaded again. but through libpEpAdapter

PYADPT-116
heck 2 years ago
parent 5738a2ea33
commit d94e5881f4

@ -186,16 +186,11 @@ def run(name, color=None, imap=False, own_ident=1, leave=False):
pEp.message_to_send = messageToSend
if multithreaded:
from threading import Thread
def sync_thread():
print(colored("********* ", "yellow") + colored("sync_thread entered", color))
print(colored("********* ", "yellow") + colored("UserInterface object created", color))
pEp.Sync.run()
print(colored("********* ", "yellow") + colored("leaving sync_thread", color))
sync = Thread(target=sync_thread)
sync.start()
print("Sync Start multi-threaded")
pEp.set_sync_mode(pEp.SyncModes.Async)
else:
pEp.start_sync();
print("Sync Start single-threaded")
pEp.set_sync_mode(pEp.SyncModes.Sync);
try:
if leave:

Loading…
Cancel
Save