set thread attribute