while(true) or a tcp listen : what is more efficient?
<p>I want my program to continuously wait for a trigger in order to perform the next task.</p>

<ol>
<li>One option is pooling: using an infinite loop e.g. while(true) </li>
<li>OR, Do TCP listen on a port with a relatively higher timeout.</li>
</ol>

<p>I would like to know which one of these two techniques would be more efficient too keep my application alive?</p>

<p>I feel executing while(true) would be a killer and tcp listen might be a health option since the tcp listen would use hardware interrupt ?</p>

<p>Also, In .net winform applications we have the Application.Run() method that keeps the application alive. If anyone one knows what this method does internally pls share. </p>

<p>PS: I have already considered msmq option here ( which is equivalent to tcp listen ) but I do not want a dependency on msmq.</p>
