Modifying some code to accommodate for newly added std::thread::Thread