Producer-Consumer java/py impls