[AGENT++] Synchronized mutex_destroy failed in ATM example agent

Jochen Katz katz at agentpp.com
Tue May 15 22:32:51 CEST 2007


Hi,

> When I compile and run the agent in agent++/examples/atm_mib and then
> end the program with a Control-C I get a mutex_destroy error (see
> below).
> 
> Does anyone else get this ? An how did they deal with it ?
> 20070514.18:52:27: 19677: (2)ERROR  : Synchronized mutex_destroy
> failed with (result)(ptr): (16), (139106516)

it seems that when destructor of ThreadManager is called, it is
sometimes locked and sometimes not (I will have to look into this). A
temporary fix is below.

Regards,
  Jochen

ThreadManager::~ThreadManager()
{
#ifdef _THREADS
    if (trylock())
	unlock();
    else
	unlock();
#endif
}




More information about the AGENTPP mailing list