You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Nacho Conde <ic...@tid.es> on 2006/01/24 13:17:44 UTC

Dude programming multithread

Hi, We have a dude programming a multithread application.
The application has an object Xpathlib, this object has a parser 
(XercesParserLiaison ), a evaluator (XpathEvaluator), and methods that 
can parse documents and execute xpath expressions.
¿Is possible create one object Xpatlib for each thread, without problems 
of shared memory and statics objects?

Thanks

Nacho.



Re: Dude programming multithread

Posted by David Bertoni <db...@apache.org>.
Nacho Conde wrote:
> Hi, We have a dude programming a multithread application.
> The application has an object Xpathlib, this object has a parser 
> (XercesParserLiaison ), a evaluator (XpathEvaluator), and methods that 
> can parse documents and execute xpath expressions.

> ¿Is possible create one object Xpatlib for each thread, without problems 
> of shared memory and statics objects?

There are no problems in Xalan-C with static data, since it is all 
created when you initialize the library.

Xerces-C uses the now-discredited "double-locking" strategy for lazy 
initialization of static data, which is broken on some architectures, 
but is probably not an issue for you.  If it is, use on of the later 
versions of Xerces-C that has an option to force full initialization.

Dave