Dirk Reiners wrote:

>    Hi Allen,
>
>Allen Bierbaum wrote:
>  
>
>>Backing up a step, why are these calls required with 2.0?  Don't the 
>>modifications apply to the current fc's in memory?
>>  
>>    
>>
>
>the basic structure in 2 is still the same as in 1: the system needs to 
>know when you start changing things, and it needs to know when you're 
>done with an FC.
>
>Starting is needed to create thread-local copies of shared data. In 1 
>that was done with beginEditCP(), in 2 it is done hidden inside the 
>set/edit members. Ending is needed to know when it makes sense to call 
>changed(), as changed() might be expensive and there is no point in 
>calling it something else is being changed next. It also might need data 
>from multiple fields that just cannot be set in one call, so calling it 
>after each set/edit doesn't work. In 1 that was done using endEditCP, in 
>2 that's commitChanges(). But 2 is quite a bit better, because you don't 
>have to call commitChanges() for every changed FC, but just once for all 
>of them. Nonetheless, it still needs ot be called at some point.
>  
>

I guess I am still a bit confused by this behavior. We are talking about 
code running in a single thread here right?

If I am in one thread and I make change to some fc's (for example add 
children to a node) and then try to read those changes back (ex: ask for 
number of children), I see the changes correct?  

Is there something going on in Dan's example that involves multiple 
threads or something?  If not then I am really confused because I don't 
think I have been doing any of this in the code I am using with 2.0 and 
things "seem" fine so far.

-Allen

>Yours
>
>    Dirk
>
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys -- and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>Opensg-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>  
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to