python 多线程

luochao7050838 luochao7050838 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
threads = []
times = 100
for i in range(0,times):
t = threading.Thread(target=connToServer())
threads.append(t)
for i in range(0,times):
threads[i].start()
time.sleep(1)
#for i in range(0,times):
# threads[i].join()
#connToServer()
我的代码是这样的,connToServer()函数里面有个while 1:的循环,为什么这个循环不退出,我的第二个线程就没运行啊?线程不是同步运行的吗
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
luochao7050838
脚本语言 37,737 成员 34,208 内容