Results 1 to 9 of 9
Hybrid View
-
30th Sep 2009, 05:34 AM #1OPRespected DeveloperWebsite's:
X4B.orgThe overhead that occurs due to "forking" the process in php is minimal, barely more than introducing another thread in a non interpreted language.
Its basicly starting another php executor in a child thread, howeaver all memory is referenced (using the php refcount) to the origional thread, this means that data is not duplicated for the second thread as it generally is in most mutliple thread applications (usually the programmer does this to keep things simple). Howeaver if you alter a variable then, it does create it in a new thread.
Personally when doing anything on the backend this is the best way to do things, whether its a php multiposter (Yeah Hyperz i saw your post) or a ddl submitter this is the fastest way to do things that take a long time, expecially when there is auser waiting for the results.
Oh and note that unless you are running a fcgi server (mod_fcgid, mod_fastcgi, lighttpd) you really shouldnt do this on the web server, apache does not like it (tho it is possible)SplitIce Reviewed by SplitIce on . [PHP] Threading Class Ok most people would think threading in php is dificult or not possible so I whipped up this class for one of my projects in about 10 mins. Enjoy. <?php class Thread { private $pid = false; private $file = false; private $kill = true; /* Usage (callback function): $thread1 = new Thread('function','argument1','argument2'); Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Hey Their You Guys Im New To The Class....
By BBGC in forum IntroductionsReplies: 3Last Post: 19th Mar 2012, 04:20 AM -
I need many class C IP's
By filat in forum Hosting DiscussionReplies: 12Last Post: 17th Oct 2011, 08:54 PM -
[C#] Difference with Invoke and Threading
By litewarez in forum Web Development AreaReplies: 5Last Post: 13th Jul 2010, 04:53 PM -
[c#] Multi-Threading and keeping the GUI useable.
By jayfella in forum Web Development AreaReplies: 0Last Post: 18th Jun 2010, 12:07 AM
themaPoster - post to forums and...
Version 5.38 released. Open older version (or...