PR: Close the thread handle when a realtime thread fails to start