php: queue / dont delay the user -


i have piece of code takes while run , low priority. wondering if in php can like

public function put () {    $comment = array('title' => 'my title', 'description' => 'my description');    sendtoqueue($this->internalcall('controller' => 'comment', 'data' => $comment);    $object = $this->get('id' => $this->id);   return $object; } 

where function inside sendtoqueue wouldnt delay $object being fetching , returned , run in bg.

possible? know can throw python ideally i'd run within current scope.

if need run in current scope fork (pcntl_fork()) process , let child handle whilst parent carries on

otherwise run script periodically empties queue of tasks.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -