Geeksoftie 0 Newbie Poster 12 Years Ago I was asked to write code for consumer and producer threads accessing shared queue in an interview with the given primitives ADDNEW.Process PROCESS.SET PROCESS.RESET ENTER CS EXIT CS LOOP EXIT LOOP WAIT# PROCESS c++ 0 0 Share L7Sqr 227 Practically a Master Poster 12 Years Ago ... And what have you got so far? 1 0 Share Geeksoftie 0 Newbie Poster 12 Years Ago createevent write setevent write if read wait enter cs write exit cs sleep reset This what I told and he told it is incorrect 0 0 Share DeanMSands3 69 Junior Poster 12 Years Ago Let me Google that for you: http://lmgtfy.com/?q=producer+consumer+c%2B%2B+pthread Third link on first page: http://richiejp.com/pthread-producer-consumer-example-in-c/ 0 0 Share jimzandueta 0 Newbie Poster 12 Years Ago here's a good application that simulates the consumer-producer problem : http://sourceforge.net/projects/bufferanimation/ 0 0 Share Share Facebook Twitter LinkedIn Reply to this topic Be a part of the DaniWeb community We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge. Sign Up — It's Free!
Geeksoftie 0 Newbie Poster 12 Years Ago createevent write setevent write if read wait enter cs write exit cs sleep reset This what I told and he told it is incorrect 0 0 Share
DeanMSands3 69 Junior Poster 12 Years Ago Let me Google that for you: http://lmgtfy.com/?q=producer+consumer+c%2B%2B+pthread Third link on first page: http://richiejp.com/pthread-producer-consumer-example-in-c/ 0 0 Share
jimzandueta 0 Newbie Poster 12 Years Ago here's a good application that simulates the consumer-producer problem : http://sourceforge.net/projects/bufferanimation/ 0 0 Share