[xml] Thread safe



Hi,
 
I have two questions for using libxml2 in a threading environment. The code is written in c++, glibc2.96,pthread..:
1. for a "read-only" xmlDoc object(a xmlDocPtr), is it necessary to set up a mutex for reading?
2. there are two classes dealing with two different xmlDocPtr objects, one is a static xmlDocPtr for global sharing, another is a per thread based xmlDoc content, I'm assuming I just need call xmlInitParser()/xmlCleanupParser() once somewhere globally, is this right?
 
TIA
 
Xiang  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]