Re: Threading?

Jon Ferraiolo wrote:

> Although I do not believe that any standards actually document this, it 
> is my understanding of the standard web page processing model is that 
> you have single-threaded access to the DOM. Even with Microsoft's 
> next-generation user interface system, XAML/Avalon, there is only one 
> "user interface thread", even though you have have any number of other 
> threads such as multiple threads talking to Indigo communications 
> services. Similarly, in the standards-based world, my understanding is 
> that you have single-threaded access to the DOM, but it is very possible 
> to have other threads within your scripting engines, assuming the 
> programming language supports threads; however, usually the extra 
> threads need to access the main DOM thread one at a time.

    So I'm fine with all of the above but... How do the extra
threads access the main DOM thread?

    There _must_ be a method in the DOM to give access.  You
might look at the interface in Java for doing this with AWT:

http://java.sun.com/j2se/1.3/docs/api/java/awt/EventQueue.html

    The invokeLater and invokeAndWait methods.   Analogs of
these could easily be added the the SVGSVGElement or SVGDocument
interfaces.  One would need to carefully define the order of
execution semantics of the methods (are they always run in
the order submitted, may they be run 'out of order', or are
they ordered only within one submitting thread.

    These would dictate the behavior of these methods in the
cases where they are called from the main DOM thread.

> 
> Jon
> 
> At 08:00 AM 12/11/2004, Alexander Adam wrote:
> 
>> hi!
>>
>> I got a quick question about the SVG 1.2 Implementation. Is it 
>> possible to
>> have threads in scripts? This should be seriously considered, e.g. if you
>> want to work with a lot of data in the background.
>>
>> thanks!
>>
>> Alexander Adam
>> Project Manager
>> EvolGrafiX Europe
>> http://www.evolgrafix.com - client@evolgrafix.com
>> Phone: +49 991 3831718
> 
> 
> 

Received on Sunday, 12 December 2004 23:31:27 UTC