type of threadNum is size_t