812624 / miscellaneous Goto Github PK
View Code? Open in Web Editor NEWC++ program with three threads; A, B and C. Thread A generates random integers and pushes them into a shared queue. Threads B and C compete with each other to grab an integer from the queue. The threads B and C compute the sum of integers that they have grabbed from the queue.