[AGENT++] Synchronized access to newly NotificationOriginator derived class's instances from different threads

Yasemin YILMAZ yaseyilmaz at gmail.com
Tue Apr 20 11:03:38 CEST 2010


Hi Frank and Agent++ users,

Does Agent++ provide synchorized access to Mib::instance->notify(..)
function from different threads simultaneously?

I have a NotifricationOriginator derived class as following:

class agentCpuUsageExceededTrap: public NotificationOriginator {
public:
    agentCpuUsageExceededTrap();
    virtual ~agentCpuUsageExceededTrap();

    virtual void  generate(Vbx*, int, const NS_SNMP OctetStr&);
};

And let's suppose, two agentCpuUsageExceededTrap instances will be used in
different threads and both threads call the function generate concurrently
(generate calls Mib::instance->notify(..)). In that case, does
synchronization problem occur because Mib::instance is unique (singleton)?
In this respect, is Agent++ thread-safe?

Thanks so much for Agent++ and your helps

Best regards,
Yasemin



More information about the AGENTPP mailing list