Subject: Re: Thread safety issues

Re: Thread safety issues

From: jmk <>
Date: Wed, 01 Sep 2010 14:59:27 -0500

On Wed, 2010-09-01 at 17:17 +0200, Simon Josefsson wrote:
> > Not feasible given the current design of my application -- all SSH code
> > is contained within a module, which can be loaded by one or more
> > threads.
> Ouch. How does your application handle this for other libraries? There
> are many libraries out there that need global initialization. So it may
> make sense to consider making your application call a module-init
> function before proceeding. Of course, this is speaking just generally,
> and there may be reasons why this isn't an option for you.

I also never claimed I really know what I'm doing. ;) This is the first
time that I've encountered a library specific to only one of my modules
which requires global initialization. Libraries, such as OpenSSL, are
used across the application and can be initialized in the core. I
believe module init/exit functions would make sense for this type of
situation. That's been added to my TODO list to look at.


Received on 2010-09-01