Re: [xml] Thread check

On Tue, Nov 19, 2002 at 02:16:32PM -0000, spinmar interfree it wrote:


In my application I build a xml tree taking informations from diffrent sources: well I'd like to improve 
the performance and so to use threads.

  hum ... as long as the tree is read-only that's should be fine

My system is linux red hat 8.0: libxml2 (rpm package) was installed by default. How can I know if the 
libexml2 has been installed with the option --with threads?

  I built that package, the thread option is not enabled.

I have different functions: each one parses a specific source and then adds the extracted informations in 
the same xmlDocPtr. 
Shall I use xmlMutexPtr?

  to serialize access to the xmlDocPtr, yes. But the library ain't compiled
with threads support...

In libxml2 shall I use:

/* read write global data */

  You won't need it for read but you will need it for writes...
try to avoid writing concurrently to the same document, use another mechanism
if you can...


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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