Implementing a Thread-Safe Queue using Condition Variables (Updated)Tuesday, 16 September 2008 One problem that comes up time and again with multi-threaded code is how to transfer data from one thread to another. For example, one common way to parallelize a serial algorithm is to split it into independent chunks and make a pipeline — each stage in the pipeline can be run on a separate thread, and