ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] How php works?
by Roman Neuhauser other posts by this author
Dec 13 2006 3:59AM messages near this date
Re: [PHP] How php works? | Re: [PHP] How php works?
# maillist.kai@[...].com / 2006-12-13 18:57:58 +0800:
>  On 12/13/06, Roman Neuhauser <neuhauser@[...].cz> wrote:
>  ># maillist.kai@[...].com / 2006-12-13 14:15:26 +0800:
>  >> 3. Take linux apache for example, if compiled as a apache module,
>  >> and using prefork threading model, for example, if I have 100
>  >> process, is that means I have 100 copy of PHP library local data(I
>  >> assume only one reentrant excutable image) in each process? compare
>  >> to a worker model, like 10 process and 10 threads in each one
>  >> process, should it make a difference that we only have 10 copy of
>  >> PHP library local data ?
>  >
>  >Practical concerns make your question moot: even if the basic
>  >distribution was all threadsafe, you're bound to hit a library that
>  >uses strtok(3) or strerror(3), or static variables. How much of the
>  >code you rely on is labelled by its authors as threadsafe?
>  
>  
>  So it is not a good idea to use worker and php module at the same
>  time, but if no threadsafe problem , maybe my thinking is right?

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
>  Btw, I thought strerror in libc were thread-safe.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In a touch of genius, you summed up the whole thread-safety problem
so succintly, it puts an end to the whole thread.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Kai Xiang
Tedd
Kai Xiang
Jochem Maas
Kai Xiang
Roman Neuhauser
Kai Xiang
Roman Neuhauser
Jochem Maas
Kai Xiang

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved