gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnutls-dev] Re: living without global variables


From: Simon Josefsson
Subject: [gnutls-dev] Re: living without global variables
Date: Wed, 28 Dec 2005 10:07:12 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

address@hidden (Bryan Henderson) writes:

>>This is a one time call initialization function, so it is 
>>perfectly ok to leave the thread stuff to the called application.
>
> The reason it's not _perfectly_ OK is what I started this whole
> discussion with: lack of modularity.  The calling code may be a module
> of a larger program.  That larger program may contain another module
> which also uses GnuTLS.  The two modules run in their own threads.  As
> modules, they don't know about each other and cannot coordinate their
> calls to gnutls_global_init().  Modularity also forbids the code which
> is the parent of the threads/modules from knowing that GNUtls is down
> inside those modules, so the parent code can't call
> gnutls_global_init() either.
>
> It's _reasonable_ to produce a GnuTLS that has a nonthreadsafe
> gnutls_global_init() and not threadsafe alternative -- it just means the
> library isn't all it could be.

If there is a way to fix the problem, without causing other problems,
of course we will do it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]