Re: beginUpdateBatch and threads

vaab <[email protected]> Thu, 26 May 2005 14:17:13 +0200
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
This is my own solution for the moment, feel free to complete : (thx Neil)

Javascript is multithreaded, but in UI (as UI is not threadsafe) , 
there's only one thread. This means that instruction are run 
sequentially, and that an event can occurs only when javascript 
instruction pointer has finished processing all code.

In my case this means that a simple batch nest counter will suffice to 
ensure that begin/endUpdateBatch doesn't cross. This means also that 
these fonction aren't as transaction for databases, but just thought for 
  efficiency when several updates have to be thrown into the database.

Hope this helps,

Valentin