Skip to content

Instantly share code, notes, and snippets.

@taiit
taiit / consumer.c
Last active September 23, 2015 10:39 — forked from Alexis-D/consumer.c
Producer / Consumer / Conditions variables / pthreads
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define BUF_SIZE 5
// the buffer works like a stack for
// the sake of simplicity, if needed
// we may implement a queue