>>4
A function can return different results each time it is called (that mean's it's not a functional function... that is, it relies of side-effects), of course, the arguments themselves can change within the condition as well. Here's a practical example:
while(is_data_processed()) sleep(1);
That could would pause/yield(not wasting much CPU cycles) the current thread, until some data is done processing. Of course, real OSes might have more specialized APIs for async events (here's a Windows example):
WaitForSingleObject(hEvent,INFINITE)
In that case, the thread would be yielded indefinetly until the event is signaled (which would cause that thread to be switched to (eventually) and that function returning). The second example is slightly less wasteful on CPU cycles, but the first one isn't that bad either (unless is_data_processed() is something very CPU intensive, which it shouldn't be).