in python, if i want to keep a process or thread running forever, i can typically do this with an empty while loop:
while 1: pass
Don't use busy waiting. Depending on what you are waiting for, use one of the operating system's blocking wait functions, e.g. select on Unix and WaitForSingleObject/WaitForMultipleObjects on Windows.
select
WaitForSingleObject
WaitForMultipleObjects