From a7e9d3f37d5e9fba4b9acaa43e7c12b6d9a669ae Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 8 Jun 2006 10:59:26 +0200 Subject: Load /tmp/libxml2-2.6.26 into libxml2/branches/upstream/current. --- doc/threads.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'doc/threads.html') diff --git a/doc/threads.html b/doc/threads.html index 8082dbd..e6fe497 100644 --- a/doc/threads.html +++ b/doc/threads.html @@ -7,15 +7,16 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Thread safety
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Thread safety

Developer Menu
API Indexes
Related links

Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent -threads can safely work in parallel parsing different documents. There is -however a couple of things to do to ensure it:

  • configure the library accordingly using the --with-threads options
  • -
  • call xmlInitParser() in the "main" thread before using any of the - libxml2 API (except possibly selecting a different memory allocator)
  • -

Note that the thread safety cannot be ensured for multiple threads sharing -the same document, the locking must be done at the application level, libxml -exports a basic mutex and reentrant mutexes API in <libxml/threads.h>. -The parts of the library checked for thread safety are:

XPath is supposed to be thread safe now, but this +wasn'ttestedseriously.

Daniel Veillard

-- cgit v1.2.3