Bodo Moeller wrote:
> On Sun, Dec 17, 2000 at 04:22:17PM -0800, Dan Kegel wrote:
> >>> I think it is a fool's errand to try to make it possible to
> >>> "share" every data structure across threads.
> >> Noone has said "every", but some have asked for "some".
> 
> > And then there are the contrarians who ask for "none".
> > It ought to be possible to provide an OpenSSL API which doesn't
> > do any locking at all, for the benefit of those apps which are
> > structured so threads don't stomp on each other.
> 
> This certainly can be done, but it requires extensive API changes.
> In particular, we'd have to add an ERR_STATE * argument to every
> function that may fail.  

And, as you mentioned a moment ago, the session cache needs to be 
shared across threads in most apps:
 
> ... it is not usual to have multiple threads use SSL
> structures created from a single SSL_CTX, and access to this SSL_CTX
> and dependent objects (such as the session cache) has to be
> thread-stafe.

IMHO the API would be cleaner if it did add an ERR_STATE * argument to
every function that might fail, but I agree that there needs to
be a way for multiple threads to store things in the session cache.
There are ways to do this without the API dictating the use of mutexes,
but they're hard (sort of like my earlier event-based SSL api proposal).
- Dan
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to