modify thread auto binding to manual binding, and modify thread into a template version