0
I need to run a function through a Thread only I’m not sure how to recover the return of this function. Below an example of how I want to do:
from threading import Thread
import time
def teste_thread():
for k in range(5):
print('Executando Thread')
time.sleep(1)
return 'Thread Executada com sucesso!' #Como faço para pegar esse retorno de função?
t = Thread(target=teste_thread)
t.start()
print('Isso foi colocado depois do inicio da Thread')
Your solution solved my problem, thank you very much for your help.
– Cleyson Lima
I’m glad I could help. Hug!
– escapistabr