/producer-consumer

Producer & Consumer simulation to experiment and learn threading.

Primary LanguageCMIT LicenseMIT

Producer - Consumer Simulation

Author: nefari0uss

language c Open Source Love Build Status

Summary

This simulation was to help learn about threading in C using producers and consumers. Producers create and place an int in a buffer. Consumers will attempt to remove ints from the buffer.

Compilation Instructions

  • Run $ make to compile.
  • Run $ ./pc x y x where x,y, and z is some integer specifying the sleep time, number of producers, number of consumers.

Asciicast

asciicast