“select” on multiple Python multiprocessing Queues?

前端 未结 8 1484
情书的邮戳
情书的邮戳 2020-12-24 01:55

What\'s the best way to wait (without spinning) until something is available in either one of two (multiprocessing) Queues, where both reside on the same system?

8条回答
  •  独厮守ぢ
    2020-12-24 02:30

    Don't do it.

    Put a header on the messages and send them to a common queue. This simplifies the code and will be cleaner overall.

提交回复
热议问题