Wrote a blocking queue template.