xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Roddey <drod...@charmedquark.com>
Subject Re: Multithreading question
Date Fri, 02 Feb 2001 05:29:34 GMT
Given that any complex data structure like the DOM can possibly do some to
lots of lazy eval type stuff, even a read can potentially cause
modifications to the data. It might not be happening now, but could at any
point in the future, which would break your whole scheme. So its probably
best not to make any assumptions, and just do the right thing.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"We're gonna need a bigger boat"


----- Original Message -----
From: "Norris Cheng" <ncheng@quack.com>
To: <xerces-c-dev@xml.apache.org>
Sent: Thursday, February 01, 2001 7:42 PM
Subject: Multithreading question


> Hi, I understand that in a multithread environment, only one thread can
> enter a DOM tree at the same time, which means i have to do some
> synchronization. So does that mean even for accessor methods such as
> getNodeName, i have to make sure that only one thread is calling it at any
> moment?
>
> What if i am sharing a DOM tree between multiple threads, but the threads
> are actually accessing different parts of the tree? For instance, if i
have
> a DOM tree from "<root><a></a><b></b></root>", if
thread A accesses
element
> "a", and thread B accesses element "b", can that be concurrent? If not,
> would cloning the subtrees solve the problem?
>
> Thanks
>
>
> Norris Cheng
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


Mime
View raw message