< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

Re: [reSIProcate] [reSIProcate-commit] resiprocate 8871 sgodin: -fixed potential multi-threading issues with static member variable initialization


Hi Scott,

There is some intricacy of C++ that I don't understand. Could you explain the thread safety issue below? Is there a difference in when the constructors/destructors are called?

Thanks,
Kennard

+static const Data errorContextData("Contents");
 const Data&
 Contents::errorContext() const
 {
-   static const Data context("Contents");
-   return context;
+   return errorContextData;
 }


On Sat, Nov 27, 2010 at 7:37 AM, <svn@xxxxxxxxxxxxxxx> wrote:
Projectresiprocate
New Revision8871
Committersgodin (Scott Godin)
Date2010-11-27 09:37:49 -0600 (Sat, 27 Nov 2010)

Log

 -fixed potential multi-threading issues with static member variable initialization
 -expose resip local logger id to applications
 
 

Modified:


_______________________________________________
resiprocate-commit mailing list
resiprocate-commit@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-commit