set `thread` = 0