Merge "Detach pollThread only if it is joinable" into pie-vts-dev