[sword-devel] Thread safety?

Joachim Ansorg sword-devel@crosswire.org
Wed, 11 Sep 2002 10:12:30 +0200


AFAIK Sword is NOT thread safe. We had strange problems with Sword threads in 
BibleTime. Now we don't use threads any more.

Sword uses static members.

Joachim


> On September 10, 2002 15:46, Geoffrey W Hastings wrote:
> > On Wed, 11 Sep 2002 03:52:25 +0600 porton@narod.ru writes:
> > > How much libSword is thread safe?
> > >
> > > Can I safely simulateously access two different modules?
> >
> > Yes. In Windows just open the program again as many times as you desire
> > differnent modules opened,
>
> That doesn't mean that the library is thread safe since each instance of
> the application has its own copy of Sword in memory. Therefore there is no
> chance for one thread to clobber another.
>
> Joel
>
> > > How about iterating through the SWMgr's list of modules from two
> > > threads simulateously?
> > >
> > > How about getting a module info (e.g. "module->Description()") from
> > > two  threads simulateously?
> > > --
> > > Victor Porton (porton@ex-code.com)