[AGENT++] agent++v3.5.30: Funny code in threads.cpp

Frank Fock fock at agentpp.com
Tue Aug 3 17:55:50 CEST 2010


Hi,
If I remember it correctly, the code makes sure that also if non- 
blocking locks have been used, the unlock is not called without  
preceeding lock.

I will have a closer look at this though.

Best regards,
Frank

Von meinem iPhone gesendet

Am 03.08.2010 um 12:25 schrieb Dominik Vogt <Dominik.Vogt at external.thalesgroup.com 
 >:

> What is this code snippet from threads.cpp supposed to do?  That looks
> either useless or wrong:
>
>    ThreadManager::~ThreadManager()
>    {
>    #ifdef _THREADS
> -->        if (trylock())
> -->               unlock();
> -->        else
> -->               unlock();
>    #endif
>    }
>
> Ciao
>
> Dominik ^_^  ^_^
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp



More information about the AGENTPP mailing list