Rojay Posted July 3, 2007 Share Posted July 3, 2007 what are the steps that i should folow to run a (child)thread from the parent process ? Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted July 3, 2007 Share Posted July 3, 2007 I may be wrong, but AFAIK PHP doesn't natively support threading. You can fake the concept though by using exec or system function calls and redirecting the output to /dev/null; this will cause the script to execute in the background and immediately return control to the calling script. After you successfully execute multiple scripts at once, the next step is to allow them to communicate with each other. Since neither script will have access to the other's memory space, you will need to use disk storage to accomplish cross-script communication. Note that disk storage is just a general term for files, whether they're text files, database files, etc. Hope that helps you out some. Also, you might try google searching any of the following terms along with PHP: fork, child process, mutex Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.