Re: [xml] is libxml2 library thread safe
- From: Daniel Veillard <veillard redhat com>
- To: "Martin B." <0xCDCDCDCD gmx at>
- Cc: xml gnome org
- Subject: Re: [xml] is libxml2 library thread safe
- Date: Thu, 26 Jan 2012 21:15:51 +0800
On Mon, Jan 23, 2012 at 10:11:58AM +0100, Martin B. wrote:
On 22.01.2012 23:15, ajay bhadauria wrote:
Is libxml2 library is thread safe ? Can we use the same
xmlSchemaValidCtxtPtr across the threads for schema validation ?
libxml2 is thread-safe after the library has been initialized with
for concurrent operations on different trees yes
I would assume that xmlSchemaValidCtxtPtr is also thread-safe in
general. (As long as you do not use it on the same object.)
I think you need to create one validity context per thread.
Then the validations can run concurrently.
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
] [Thread Prev