Thread: thread homework
View Single Post
  #1 (permalink)  
Old 05-19-2008, 02:38 PM
integralli integralli is offline
Member
 
Join Date: May 2008
Posts: 3
integralli is an unknown quantity at this point
thread homework
Can anyone help me to implement the code for the following assignment:

There is a "box" where numbers are written. A thread named WriteThread writes a number to the box, while another thread ReadThread reads the number from the box.

Access to this box needs to be synchronized and any number written by WriteThread has to be read by ReadThread.

WriteThread cannot write the next number if the number is not read by ReadThread first and vice versa.

I appreciate any help.
Reply With Quote
Sponsored Links