How to share data between threads in this threaded TCPServer?

后端 未结 1 1646
醉酒成梦
醉酒成梦 2020-11-29 07:00

I\'m working on a project which involves sending data over TCP. Using the ThreadedTCPServer I\'m able to do that already. The server thread only needs to read incoming strin

相关标签:
1条回答
  • 2020-11-29 07:29

    Try sharing a Queue between your threads.

    Useful resources

    • An Introduction to Python Concurrency, a presentation by David Beazley, provides a good nice intro to multithreading, thread communication, and concurrency in general.
    0 讨论(0)
提交回复
热议问题