Hi, On Tue, 2009-03-24 at 01:33 -0300, Thiago Bastos wrote: > Hi Gerrit, > > I'm looking at it and are about to change the refcounting to > atomic > operations. It's just compiling right now so I will know more > soon ;) Hopefully you'll have a stable ref counter as you hit > office > tomorrow morning ;) > > Hmmm, and what are the impacts of that change? > > Clearly, atomic ref-counting is needed if you're running more than one > thread in the same aspect. But if it's going to make things slower for > programs that do not have multi-threaded aspects, I'd advocate for it > not making into the trunk (or at least not as a default option).
hmm, currently I'm more for having the safe solution inside the trunk, do some timings and than decide what the default should be. > I'm skeptical that running multiple threads in the same aspect would > be safe in OpenSG -- there are probably many other hidden problems > beyond ref-count synchronization. And I doubt that this feature would > make sense for most programs anyway. Generally speaking, having > multiple threads in the same aspect "breaks" OpenSG's concurrency > model. So, if this is something that might only work (or make sense) > in some situations, I'd leave it as a "do-it-at-your-own-risk, > experts-only" option. I'm not so sure, but what Allen is doing make perfect sense. IMHO we should support this scenario as it is a much easier and more efficient way to implement parallel producers than with different aspects as you can easily run 100 producers in parallel without having to have 100 aspects. And if needed you could get away with using only 1 for all of them. > PS: is commitChanges() already automatically synchronized among the > threads that share an aspect, or do you have to manually sync the > threads everytime you want to call it? (which I imagine would kill any > performance gains from multi-threading for most applications). there is no need to sync threads for this call as long as they don't modify the same object, but for now use commitChangesAndClear before control is transferred between threads. kind regards, gerrit ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
