On 24. Oct 2008, at 9:25, Dan Wilcox wrote:

>
> Howdy,
>
> I'm implementing distributed data through sub classing  
> eq::net::Object.
> Currently, I keep one instance of each synamic object in a Singleton  
> class
> and, following the eqPly example, pass the ids through an INSTANCE  
> object.

Minor note: Imo the 'object table' should be one member of your  
config, instead of a singleton.

> I register and map the objects in the Config class and map them  
> again in the
> Pipe class.

So presumably this is frame-specific dynamic data you want to keep  
once per pipe - then you might also want to relax frame  
synchronization so that pipe threads are not node-synchronized. The PG  
explains this.

>  I use the version numbers to make sure I don't try and read
> again on the same node that updated.

Not sure what you mean here - you can update an Object to its current  
version, sync( getVersion( )) is a NOP.

>
>
> Everything works fine, except I get warning messages from the  
> eq::Session
> destructor:
>
> 31949 3068037424 ./lib/net/session.cpp:50 2 attached objects in  
> destructor
> 31949 3068037424 ./lib/net/session.cpp:57   1 objects with id 1
> 31949 3068037424 ./lib/net/session.cpp:57   1 objects with id 2
>
> Is there a proper way to make sure I detach the objects on exit?  Is  
> this
> warning due to double mapping the same object on each node, Config/ 
> Pipe?

You should use Session::unmapObject() and deregisterObject() for each  
mapObject() and registerObject(), respectively. This is typically done  
in configExit(). You can map the same object to multiple instances,  
even on a single node, for example for keeping one copy/version for  
each pipe thread.

If you are doing this already, please check which objects are still  
mapped. You should have a debug print during registration which prints  
the typeid of each object, along with its identifier.


HTH,

Stefan.


_______________________________________________
eq-dev mailing list
[email protected]
https://in-zueri.ch/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Reply via email to