beginUpdateBatch and threads

vaab <[email protected]> Thu, 26 May 2005 11:26:27 +0200
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Hi,

I implemented a nsIRDFDataSource in javascript, but was wondering how 
could I sort which endUpdateBatch will match the correct 
beginUpdateBatch. I checked in LXR, but could not find any real 
implementation of these functions... !!

Is it normal, and do someone knows how to insures that it is the same 
thread that close the its proper beginUpdateBatch ?

If I'm not clear enough, there is a more in-depth explanation :

say you have a function you call when the user click a button, and 
another that occurs whenever an other events occurs (database change or 
whatever could be observed), the 2 events could happen at the same 
time... these 2 events will try to create their own batch with the 2 
function beginUpdateBatch and endUpdateBatch. If not thought for, the 2 
scripts will interact badly and mess up themselves, I'm trying to 
prevent this...

I'm looking at the point of view of constructing these functions in 
javascript... How would you do to stop one javascript call to end a 
batch of another ?

Thanks for your help.

Valentin.