Re: [xml] Thread check
- From: Daniel Veillard <veillard redhat com>
- To: spinmar interfree it
- Cc: xml gnome org
- Subject: Re: [xml] Thread check
- Date: Tue, 19 Nov 2002 09:35:50 -0500
On Tue, Nov 19, 2002 at 02:16:32PM -0000, spinmar interfree it wrote:
Hi,
In my application I build a xml tree taking informations from diffrent sources: well I'd like to improve
the performance and so to use threads.
hum ... as long as the tree is read-only that's should be fine
My system is linux red hat 8.0: libxml2 (rpm package) was installed by default. How can I know if the
libexml2 has been installed with the option --with threads?
I built that package, the thread option is not enabled.
I have different functions: each one parses a specific source and then adds the extracted informations in
the same xmlDocPtr.
Shall I use xmlMutexPtr?
to serialize access to the xmlDocPtr, yes. But the library ain't compiled
with threads support...
In libxml2 shall I use:
xmlNewMutex
.......
xmlMutexLocK
/* read write global data */
xmlMutexUnlock
.......
?
You won't need it for read but you will need it for writes...
try to avoid writing concurrently to the same document, use another mechanism
if you can...
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]