in reply to While(1) using 100% CPU
select ( READ, WRITE, EXCEPTION [, TIMEOUT ] ) [download]
"As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom