Hi all,
Suppose, I have an application or library code containing following :-
while (expected condition has not occurred)
{
handling of expected condition
}
If i'm not wrong, you mean 'while (expected condition has not occurred) ;' (note the semicolon)
Otherwise, it does not make sense logically.
IMHO, busy waiting like this would not be recommended in any app, and not at all inside kernel code.
In case, there is absolutely no choice but to wait on a while(), the simplest way to let the user know about the internal state of your app/library is by having (a) log statement(s) inside the loop.
HTH. CMIIW...
Best regards,
Pranav
http://pranavsbrain.peshwe.com