[英]Python relation/communication between two or more threads
I'm new in Python, so I need some help.我是 Python 的新手,所以我需要一些帮助。
I created a server with我创建了一个服务器
SocketServer.ThreadingTCPServer
SocketServer.ThreadingTCPServer
but my question is: Is there any way to communicate between two thread?但我的问题是:有没有办法在两个线程之间进行通信?
You can share a Queue http://docs.python.org/library/queue.html between the threads.您可以在线程之间共享队列http://docs.python.org/library/queue.html 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.