> "Scott MacVicar" wrote in message:
> >
> >
> > Do you think any locking function is implemented in openssl php 
> > extension?
> >

> In PHP a SSL_CTX is per thread and is not shared across other threads so 
> it isn't an issue. We don't need to implement any openssl locking 
> functions.

It does not matter whether you think the locking functions are needed or 
not. It's matter what openssl developers think and what assumptions they did 
when developed the library. As I see they expressed it pretty clear - some 
globals are implicitly shared among threads and this alone may cause crashes 
if locks are not used. Do you have any _strong_ reason to believe they are 
wrong? They didn't say that it's SSL_CTX is the global struct that will be 
implicitly shared. Even if you're correct and SSL_CTX is "the global", why 
would they need 32 locks synchronizing access to it?

> An example of non-thread safe is gettext it relies on the locale which is 
> per process and not per-thread.
> PHP itself at the core is thread safe. As Johannes said most common 
> modules are too.

Not only yet. Do you remember dl() ? It's still here and being enabled may 
cause races.
Do you think chdir won't cause races?


-j



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to