From 35a201cc8ef0c3f5b2df88d2e528aabee1048348 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 18:47:09 +0200 Subject: Initial/Final commit --- libxml2-2.9.10/doc/threads.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 libxml2-2.9.10/doc/threads.html (limited to 'libxml2-2.9.10/doc/threads.html') diff --git a/libxml2-2.9.10/doc/threads.html b/libxml2-2.9.10/doc/threads.html new file mode 100644 index 0000000..d16e7d7 --- /dev/null +++ b/libxml2-2.9.10/doc/threads.html @@ -0,0 +1,30 @@ + + +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:

    +
  • concurrent loading
  • +
  • file access resolution
  • +
  • catalog access
  • +
  • catalog building
  • +
  • entities lookup/accesses
  • +
  • validation
  • +
  • global variables per-thread override
  • +
  • memory handling
  • +

XPath has been tested for threaded usage on non-modified document + for example when using libxslt, but make 100% sure the documents + are accessed read-only !

Daniel Veillard

-- cgit v1.2.3