[xml] libxml2 re-entrancy (thread safe) for multiple "reads" of same file from different threads
- From: ebin jose <ebin jose gmail com>
- To: xml gnome org
- Subject: [xml] libxml2 re-entrancy (thread safe) for multiple "reads" of same file from different threads
- Date: Thu, 9 Jul 2009 19:35:43 +0530
Hi,
I have few quires on thread safety (re-entrancy) of libxml2.
In my application , I want to parse the same xml file (say
"chapter1.xml") from two different threads. I need to do only read
operation - no writes.
Does libxml2 allow this multiple read operation (from separate threads)
on a same xml file ?
Or application need not take special care to access same file from
multiple threads (like mutex locking etc in application thread code)?
In my application two different threads can call this (mentioned below)
function with same file.
DocPtr = xmlParseFile ( (const char *) FilePath)
{Apart from the above mentioned function, I will be calling libxml2 tree
API's to completely parse the file}
I believe this function will return two different DocPtr , then I can
use two pointers independently in my threads.
Is my assumption correct?
If my assumption is not correct then how can I achieve re-entrancy ?
Thanks in advance.
-Ebin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]