--- embedaddon/libxml2/doc/threads.html 2012/02/21 23:37:58 1.1.1.1 +++ embedaddon/libxml2/doc/threads.html 2013/07/22 01:22:23 1.1.1.2 @@ -7,7 +7,7 @@ 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 +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 @@ -23,5 +23,6 @@ The parts of the library checked for thread safety are
  • validation
  • global variables per-thread override
  • memory handling
  • -

XPath is supposed to be thread safe now, but this wasn't tested -seriously.

Daniel Veillard

+

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