Re: [xml] Thread safety question
- From: "Brent R. Matzelle" <bmatzelle yahoo com>
- To: xml gnome org
- Subject: Re: [xml] Thread safety question
- Date: Sat, 5 Jan 2002 08:42:19 -0800 (PST)
--- Daniel Veillard <veillard redhat com> wrote:
On Sat, Jan 05, 2002 at 07:36:03AM -0800, Brent R. Matzelle wrote:
Is it possible to have multiple threads reading (not altering) a
single xmlDocPtr at the same time or will I require a mutex? I
read
It requires a mutex.
the Thread safety document on xmlsoft but I would like to make
sure.
Only parsing is thread safe (and assuming the library got
compiled
with the adequate options). Putting locking at the tree access
level
would put a terrible burden on apps not requiring it. It's both
simpler
and more efficient in most case to let the application do the
locking
to protect concurrent tree accesses.
That makes good sense. Thanks very much. I will control the locking
on the application side.
One other question. My program contains a DOM that creates new nodes
pretty often which, given time, would make the DOM quite large. I
looked over the documentation for a xmlRemoveNode function but could
only find an xmlRemoveProp. Is there any efficient method to delete
nodes from the DOM tree and free the allocated memory without
re-creating the DOM without the unwanted node?
Regards,
Brent
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]