example of how to use fastcgi_finish_request()
<p>Can someone show a simple example on how to use <code>fastcgi_finish_request()</code> function?
I googled but only found some general mention of it, some people say they use it successfully but I could not find a single example with code.</p>

<p>For example, I have a PHP object. To send a response to a browser I generate HTML, then 
returning it via <code>getResult()</code>. Then echo the result.</p>

<p>Like this: </p>

<pre><code>$obj = new controller();
echo $o-&gt;getResult();
</code></pre>

<p>Let's say I want to take advantage of this optimization technique to send result to browser and then finish up some potentially long process like connecting to some API, like maybe Facebook API.</p>

<p>How would I go about doing this? I understand that basically I can call <code>fastcgi_finish_request();</code> and then continue executing php script. </p>

<p>I just need to see example code, I'm not smart enough to figure it out by myself.</p>
