Hi. I was trying to make my php script a bit faster by using multithreading so i forked some children that calculate some 2d strings. The problem is that i need to combine those 2d strings in the parent process but i dont know how to get them. Could i return their starting address ors sth or do they get destroyed after the child exits?
How are you forking new processes? This is getting into some very complex coding. I wrote a multi-process script to allow this a few years ago. Keeping track of children processes was one of the more difficult aspects of multi-threading/multi-processing with php. In the end I ended up using a sqlite database to pass parameters to and from the parent and its children. You could also use memcache or another caching mechanism, APC probably wont work. Need to know more about how your going doing this before I can help more.