from __future__ import print_function
import os, time, sys, threading, pickle
import _thread
def do_more(selected_site):
print(selected_site)
def do(threadName, selected_site):
do_more(selected_site);
print(f'{threadName} ended');
def main(argv):
selected_site = "abc.com"
_thread.start_new_thread( do, ("Thread-1", selected_site ) )
_thread.start_new_thread( do, ("Thread-2", selected_site ) )
if __name__ == "__main__":
main(sys.argv[1:])
Thread-1 ended
或Thread-2 ended
正在但不是两者,其次do_more()中没有任何内容正在打印