Wrap into progschj namespace.
Check stop condition under lock. Use emplace instead of push.
Do not call unlock() manually.
Use C++11 for(a:b) loop.