A python abstraction of an internal queue with threaded producers and consumers