“select” on multiple Python multiprocessing Queues?

前端 未结 8 1442
情书的邮戳
情书的邮戳 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:43

    As of Python 3.3 you can use multiprocessing.connection.wait to wait on multiple Queue._reader objects at once.

提交回复
热议问题