Hi Dominik,
On Sat, 2005-10-29 at 19:42 +0200, Dominik Rau wrote:
> * Obviously, there is a difference if I add something to the graph (B)
> in the in the main thread or in the newly started (A). Why? Is there a
> way to add geometry outside of the main thread for aspect 0 _and_ 1?!
Not directly. The way to do that is to synchronize the two aspects.
> * Oli writes in his tutorial: "Every thread has its own ChangeList" Is
> it possible, that this is wrong? If not, how can it be, that the changes
> done in t0 (working on aspect 0) are visible, even if I do nothing with
> the changelist?
Because the main thread (the one that does the rendering) is also
running in aspect 0. That's an implicit thread that is automatically
created even if you don't start anything.
> * I haven't tried it with a cluster / server setup, but I fear that
> there are differences (B1 vs. B2). Why?
Clusters and multiple threads need a little more care, see Antonio's
mail.
> * Is there a way to check which aspect a thread uses from the main
> thread? getAspect returns 0 for t0 (ok) and t1 (Bug or fetaure?) in the
> app thread.
No, right now there is no way. getAspect() is a static method that
returns the aspect of the currently running thread. The fact that you
can call it on an actual object is an unwelcome side effect of C++. :-/
I don't know about 2.0, though. Gerrit?
> This is very confusing. Is there a way to simplify / generalize this, so
> that it just works for all aspects and setups (GLUT and client /
> server)?! A helper function in ThreadManager or similar? Something like
>
> ThreadManager::the()->applyAndMergeToAppAndClearAllOthers(); //Maybe
> with a better name ;)
> mgr->draw();
> Thread::getCurrentChangeList()->clear();
Well, the 'for all aspects and setups' part is what makes it
complicated. There are lots of different ways of doing threading, so I
doubt that there is one general solution that works for everybody.
Especially since the threads need to run into a barrier before you can
sync their changes, a general solution seems improbable.
However, and this is something that we need to fix, there is currently
no good example code on how to run a little more complicated MT (e.g.
with CL merging). If somebody has a nice example I'd be interested.
Hope it helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users