finish the PThread function handle.