Browse Source

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

PYADPT-116
heck 7 months ago
parent
commit
d94e5881f4
1 changed files with 4 additions and 9 deletions
  1. +4
    -9
      test/sync_handshake.py

+ 4
- 9
test/sync_handshake.py View File

@ -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