【发布时间】:2020-08-22 06:18:18
【问题描述】:
有没有办法从后台线程转移到主线程,例如;
import threading
def func(txt):
if txt == 'foo':
## must do the processing in the main thread
pass
else:
print(txt)
thread = threading.Thread(target = func, args = ('hello',))
thread.start()
提前致谢:)
【问题讨论】:
标签: python python-3.x multithreading pyqt5