W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: DOM Level 1 Becomes a W3C Recommendation

From: Ray Whitmer <ray@imall.com>
Date: Fri, 02 Oct 1998 14:46:47 -0600
Message-ID: <36153BB7.E918EA9C@imall.com>
To: Claude Zervas <czervas@Adobe.COM>, www-dom@w3.org
Claude Zervas wrote:

> Congratulations, but the spec says nothing about this. You are misreading
> my suggestion. I'm saying the *spec* should be clear about multithread DOM
> usage.
> Your implementation and mine may support multithreading but others may not.
> For example, implementations that use cursor cacheing in the NodeList to boost
> efficiency will most likely fail when two threads are traversing the list.

Sorry  I improperly related two threads that happened to talk about NodeList and
have the same title.

Addressing thread-safety could be a good hand-holding thing, I agree, but I don't
see it as much of a show-stopper, since I can probably synchronize more
efficiently and effectively at the application level than the underlying APIs

DOM presents a complex-enough model that simply synchronizing the base calls
themselves does not guarantee that the threads will not see the DOM in an
intermediate state that is likely to be fatal to the application for a wide
variety of application reasons.  The node I am processing to may have moved or
replaced in or out of the hierarchy, etc.  I am not certain I like thread safety
at the DOM API level because it really needs to exist before that level so why
pay for it twice?

Or were you thinking of addressing thread-safety in some other way that you could
give an example of?  As long as you synchronize around the calls, calls from
different threads to the same NodeList will succeed the same as if it had been
called twice from the same thread, but perhaps you had something else in mind?
While moving to an iterator would a good hand-holding measure, I certainly don't
want to share iterators between threads.

Ray Whitmer
Received on Friday, 2 October 1998 16:47:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC