Surely the question still remains, how do you know
...that the loop never runs... ? By
...it locks up..., I assume you mean the caller, aka the script, which if true, surely implies that the loop is indeed starting and as
Corion and
ikegami have both already pointed out, you (or more accurately, your script) is 'suffering' from buffering.
A user level that continues to overstate my experience :-))
</div