[AGENT++] Process requests in multiple threads

Frank Fock fock at agentpp.com
Thu Jan 3 22:38:57 CET 2008


Hi Arnaud,

There is nothing special to keep in mind, just
the usual synchronization of concurrent access.
If the agent crashes there are at least two
possible reasons:

(1) The agent has been compiled with inconsistent
compiler flags (recompile *everything* with a
consistent setting).
(2) Managed objects are accessed concurrently from
two or more threads. Since AGENT++ uses a two
level locking internally, you should use the same
mechanism if you want to update managed objects from
external threads.

Best regards,
Frank

Arnaud COMPAN wrote:
> Hi,
>  
> I use SNMP++ and AGENT++ for a long time now without problem.
> Our agent has two threads: one that process datas and update the MIB and
> the other that answer SNMP requests.
> Note that I define _NO_THREADS and use my own lock. Basically, there is
> a global mutex locking all the MIB.
> Everything works fine.
>  
> Now, we try to use multiple threads to answer SNMP requests (because of
> multi-core platforms) but the agent crash.
> I've seen that AGENT++ can use a thread pool to process requests so it
> should work.
>  
> Is there anything to do to process requests in multiple threads ?
>  
> Best regards,
>  
> Arnaud.
>  
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list