add omitted code for get_thread

Signed-off-by: TomWu <phperwuhan@gmail.com>