线程 - 主线程永久运行,其他线程取决于另一个线程
我是Python和Preading的新手。我的目标是拥有一个正在永久运行的主线程,而其他依赖另一个线程则取决于另一个线程。我使用.join()
尝试了不同的事情,但是我无法得到答案。
这是我脑海中提出的图片: 线程想象
我是否需要守护程序之类的东西,或者我可以用简单的>解决此问题.join()
?
Im pretty new to python and threading. My goal was it to have one main thread that is running permanently and other threads that are dependent on another. I tried different things with .join()
but i couldnt get an answer.
Here is a picture what ive come up with in my mind:
Thread Imagination
Do i need something like a daemon or can i solve this with just simple .join()
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试该结构:
Try that structure: