Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 612 Bytes

File metadata and controls

12 lines (11 loc) · 612 Bytes

Multithreaded Producer-Consumer Algorithm

A multithreaded producer-consumer algorithm implemented in C
A small producer-consumer implememtation that reads from stdin; in this case an infinite number
generator that is piped in, read into finite sized queues, and sorted in real time based on whether
they are of the fibonacci, prime, or 'divisible by 3 or 5' number sets.

Instructions:
1.) make
2.) ./input | ./pc
3.) ctrl+c to end (SIGINT is handled by closing stdin which communicates to consumer threads to
clear queues and exit gracefully.)