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 ? Link to comment https://forums.phpfreaks.com/topic/58278-multi-threading/ 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 Link to comment https://forums.phpfreaks.com/topic/58278-multi-threading/#findComment-288960 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.