[AGENT++] Thread safety (new SNMP session in each thread)

techabc techabc at gmail.com
Thu May 2 09:54:00 CEST 2013


Is objects of the class Mib Thread safety ?
I hope that there should be a fully and uptodate list of ALL (snmp++,
agent++)object's thread safety property.


2013/2/28 Jochen Katz <katz at agentpp.com>

> Hi,
>
> > I have tested SNMP++ code in a scenario where I call the function
> > below simultaneously in different threads:
>
> there is no problem with this fucntion, but I would recommend to share
> the Snmp object between the threads or at least only create it once for
> each thread and reuse it. With your code, a new UDP port is opened (and
> closed) for each request.
>
> > I don't get any problems so far, however I'm confused by the
> > discussion here:
> >
> https://groups.google.com/forum/?fromgroups=#!topic/comp.protocols.snmp/9boOuteEwY4
> .
>
> This is a very old discussion and it is no longer valid. You can now
> share a Snmp object between several threads to send requests.
>
> Regards,
>   Jochen
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
>


More information about the AGENTPP mailing list