threads: fix std::bad_alloc bug when running with -nthread 0
threads: fix std::bad_alloc bug when running with -nthread 0

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3