write some api for trans thread