re-allocate resource when threadIDC changes
Merge pull request #1255 from ruil2/param_change

re-allocate resource when threadIDC changes