Safely terminate threads in pool

job execution handling
win8.1 target for vs2013