consumer producer problem. There is a std::stack of tasks to be done,
we create two worker threads to do this job and one watcher who waits on
conditional variable for the threads to signal empty container