title: CodeIgniter RESTful, async / background process
body: <p>I'm using codeIgniter RESTful API (https://github.com/philsturgeon/codeigniter-restserver) that return information (json format) to my android/iphone app.</p>
  
  <p>There are an operation where  i send some values, if it is everything OK i return 200 code as response.</p>
  
  <p>Now, i want to add a new operation at the same method: send notifications of this modifications with APNS (Apple Push Notificacion Service) and GCM (Google Cloud Messaging).</p>
  
  <p>It works well when i have to send no more than 3-5 notifications, the problem is APNS, because i have to send this messages one by one and it takes a long time, so my apps recieves a timeout exception (all the notifications are sent but the user get the Error Connection...)</p>
  
  <p>Can i send the 200 code response and then continue sending this notifications? (Something like this...)</p>
  
  <pre><code>function my_update_method_post(){
     //....GET my POST values
     update($data);
     $this-&gt;response(array('result'=&gt;1),200));
  
  
     //Send Notifications
     ....
  }
  </code></pre>
  
  <p>Thanks in advance...</p>