Refactoring message queues.

Introduced a blocking wrapper base class for message queues that use non thead safe data structures