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]