You don’t have any conditions to exit the while loop so the first time you call this method, it will start and keep running infinitely until the autonomous period is over.
To answer your original question, the reason you do not see VexCode specific examples of PID algorithms is because the theory behind PID is the same no matter what environment you are in. If you have a solid understanding of PID, feedback loops, and how to use sensors you could write a PID algorithm in virtually any environment. For that reason, authors of guides and tutorials often tend to rely on math and pseudocode since that can be translated into any situation. I would encourage you to familiarize yourself with the theory behind the calculations because it will make sight-reading non-VexCode-specific examples easier. Furthermore, if you have solid understanding of the underlying theory you could write your own custom implementation very easily. Luckily for you, I put together a collection of resources that span from abstract theory to concrete (RobotC) code. It’s a collection of several years of information and you can really learn a lot if you dedicate the time to understand it.