Application of design patterns for a simple multi-threaded application