add functions to gt_thread.