|
@ -186,16 +186,11 @@ def run(name, color=None, imap=False, own_ident=1, leave=False): |
|
|
pEp.message_to_send = messageToSend |
|
|
pEp.message_to_send = messageToSend |
|
|
|
|
|
|
|
|
if multithreaded: |
|
|
if multithreaded: |
|
|
from threading import Thread |
|
|
print("Sync Start multi-threaded") |
|
|
def sync_thread(): |
|
|
pEp.set_sync_mode(pEp.SyncModes.Async) |
|
|
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() |
|
|
|
|
|
else: |
|
|
else: |
|
|
pEp.start_sync(); |
|
|
print("Sync Start single-threaded") |
|
|
|
|
|
pEp.set_sync_mode(pEp.SyncModes.Sync); |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
if leave: |
|
|
if leave: |
|
|