Re: [xml] Newbie Help
- From: Daniel Veillard <veillard redhat com>
- To: Bryan Christ <bryan christ hp com>
- Cc: xml gnome org, Stefan Kost <kost imn htwk-leipzig de>
- Subject: Re: [xml] Newbie Help
- Date: Sat, 14 Aug 2004 04:33:02 -0400
On Sat, Aug 14, 2004 at 12:33:02AM -0500, Bryan Christ wrote:
I actually solved my problem. None of the examples and tutorials
mentioned using xmlXPathInit(). However, because I found a discussion
somewhere about needing to call this function once in a multi-threaded
application I included it in my code. However, there was nothing (that
I could find) that stated that the call had to be made outside of the
"worker thread". Since I only need to implement xml and xpath in this
one thread, I was calling xmlXPathInit() in that thread. Eventually, as
a shot-in-the-dark, I moved it to the calling process, main(), and
everything works now. Perhaps I have just overlooked the documentation
which details this behavior.
That's really strange. xmlXPathInit just do the initialization
of 4 global variables used for +Inf -Inf NaN and -0 handling in
XPath. They are truely global and hence shared by all threads,
so I would really expect xmlXPathInit() to affect all threads
identically. This is not true for all the initializations though
and it's usually better to call the init routine in the main
thread.
Thanks for the feedback, this is bizarre, but hopefully fixed now,
Daniel
--
Daniel Veillard | Red Hat Desktop team http://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]