RE: [xml] question about multi-threaded-ness of libxml2
- From: "Jones, Mark A (Mark)" <jones lucent com>
- To: "'veillard redhat com'" <veillard redhat com>, "Jones, Mark A (Mark)" <jones lucent com>
- Cc: xml gnome org
- Subject: RE: [xml] question about multi-threaded-ness of libxml2
- Date: Wed, 2 Jun 2004 08:40:08 -0400
Daniel,
Thanx for the speedy response. I have two more questions:
1. I am in doubt as to what xmlCleanupParser() is cleaning up and I would
prefer not to call it. My concern then would be how to get cleanup the global memory that the parser used.
2. I noticed that there is a compile time flag called "LIBXML_THREAD_ENABLED". Do I need to compile the
libxml2 libraries with this flag to ensure MT saft-ness?
Thanx,
M. Jones
-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com]
Sent: Wednesday, June 02, 2004 8:26 AM
To: Jones, Mark A (Mark)
Cc: xml gnome org
Subject: Re: [xml] question about multi-threaded-ness of libxml2
On Wed, Jun 02, 2004 at 08:14:16AM -0400, Jones, Mark A (Mark) wrote:
libxml2 seems to use a good amount of global memory (as in the cleanup work being done in
xmlCleanupParser()). Is there something special that I need to do for this to work in a MT environment?
Call xmlInitParser() once before starting multithreaded operations.
Call xmlCleanupParser() only once if your program ends up not using the
libxml2 library anymore, in doubt do not call xmlCleanupParser() ever.
Lots of people are using libxml2 in threaded environments, it should
work.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]