Hi Gerrit,

Gerrit Voss wrote:
> On Wed, 2008-03-19 at 14:32 -0500, Carsten Neumann wrote:
>> Carsten Neumann wrote:
>>> I see. I'm still optimistic that an effective but simple solution can be 
>>> found, I'll keep you (and everyone else on the list, of course) posted,
>> ok, Gerrit correctly pointed out that locking is only required once the 
>> ThreadManager is up and also how to make sure the lock is initialized by 
>> that time.
>> This issue should now be fixed in cvs, I'll apply the same fix to 2 
>> (trunk) as well shortly.
> 
> unfortunately I was only half right ;-). I think the init part should
> be the same as the terminate part, just hard code it into osgInit. 
 >
> The log stuff is basic enough so that should not be a problem. 
> The problem with the initFunction I suggested is that the lock won't be
> initialised if the Log is not used before the callback is called.

why? Log::lockInit is added to the list of init functions with the
static InitFuncWrapper Log::initLock. Only if that is not constructed 
before osgInit runs we get into trouble.

> Hardcoding it makes sure that no matter what happens after osgInit
> the lock it there.

For symmetry with the Log::terminate call we can still hardcode it, but 
I must be missing something wrt the initialization argument, because I 
don't see how the lock can not get initialized. Could you explain what 
situation you are thinking of ?

        Thanks,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to