Modified base thread and ThreadPool as template; Add workThread as user's thread which should inherit from BaseThread and point what the queue.