Use a shared queue of X items - One thread adds items at random times - The other thread pulls at random times - They need to synchronize when the queue is full (producer) or empty (consumer)!
File List
main.cpp [code] |
Generated on Sat Jul 16 2022 02:10:04 by 1.7.2