In Java, there is java.util.concurrent.SynchronousQueue , a queue without storage capacity. Topics trying to put / get a value are always blocked until another thread tries to get / put a value, respectively.
What are some good ways to do the same in Python? That is, I want to transfer values from a set of one or more threads to another set of one or more threads without a value that ever "belongs" to a thread in any group.
Python queue.Queue does not allow the use of length 0 by specifying a non-positive value for maximum capacity, creating an unlimited queue.
java python multithreading concurrency
Feuermurmel
source share