Jump to content

Start independent php code from with php code


jonsamwell

Recommended Posts

Hi,

 

I have some code that takes a while to process so i don't want to wait while the script executes to continue with code on the caller code. is there a way to start a script and continue on without waiting for the call stack to return to the caller once the called code has completed? i.e. mulit thread but without an end return??

 

sorry if this is confussion see below code for visual explanation

 


//some code

//call long process
$longscript = new longscript();
$longscript->process;            //this may take minutes

echo 'something';                 /* how can i call the above code and imediately go to this statement without waiting for the
                                          * longprocess to complete?
                                          */

 

So its threading but not as i know you can't do that in php yet.

 

Any ideas?

 

Jon

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.