Код: Выделить всё
from threading import Thread
def foo(bar):
print('hello {}'.format(bar))
return 'foo'
thread = Thread(target=foo, args=('world!',))
thread.start()
return_value = thread.join()
Подробнее здесь: https://stackoverflow.com/questions/689 ... m-a-thread
Мобильная версия