Clean Design of Multithreaded Code - Exercise 6