Add thread class.