This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef QUEUE_HPP | |
#define QUEUE_HPP | |
#include <cstdio> | |
#include "semaphore.hpp" | |
/** A thread-safe queue which supports one read-thread and one write-thread | |
manipulating the queue concurrently. In other words, the thread-safe queue can | |
be used in the consumer-producer problem with one consumer and one producer. **/ | |
template<typename T> |