Skip to content

Instantly share code, notes, and snippets.

View viveret's full-sized avatar

Viveret Steele viveret

View GitHub Profile
#ifndef PRODUCER_CONSUMER_QUEUE_HPP_
#define PRODUCER_CONSUMER_QUEUE_HPP_
// Based on code from http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
// Original version by Anthony Williams
// Modifications by Michael Anderson -- https://gist.github.com/482342
// Modifications by Viveret Steele -- https://gist.github.com/viveret/323d1cadf57468bd73bc97c3b952c124