← Back to team overview

yade-dev team mailing list archive

the cost of Singleton::instance()

 

Hello (Janek primarily),

can you estimate the cost of calling Omega::instance()? I see it creates
a mutex, but I don't know how much that costs. I have another option of
passing optional MetaBody* mb and then

 (mb?mb:Omega::instance().getRootBody().get())->physicalActions->/*...*/

Is it worth the pain or do I always use Omega::instance() without penalty?

Regards, V.
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev