Skip to content

joeiannone/Multithreaded-Producer-Consumer-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.)

About

A multithreaded producer-consumer algorithm implemented in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published