Add thread variable.