Talk:I3ISU - Exercise 7: Thread Communication/@comment-130.225.184.23-20121116104352

Hey group 49.

The main goals of this exercise was to:

- Learn the basics of thread communication using the message queue concept presented in class.

- To create a system consisting of two threads that communicate, one sending information that the other receives.

-To acquire knowledge of how to create a message, send it via a message queue and receive it in a given thread.

In our opinion you have overall succeded in achieving these goals.

Very nice statediagram in subexercise 3, shows your thoughts for your program in a good way.

Some thoughts on improvement:

In your msgQueue implementation we have noticed that in your recieve method you unlock your mutex before you return the "message". This will in worst case scenario result in you not getting the correct return value msg_, bacause it might be that another thread would take the mutex and start sending/recieving before the previous thread had returned the msg_ value. This issue could be solved with the use of the ScopedLocker we made in exercise 5.

Some of your answers to the questions is in our opinion too long and complicated and just seems like a dance around the question in hand. Stick to the point.

Good job.

Best regards

Group 38.