changed the thread allocation strategy.