I understand (based on your response) the subagent and master agent (or other 
subagents for that matter) should not be running as separate threads from 
within the "same" application.

However, would it be acceptable to run "one" subagent in it's own thread in an 
existing application which has other non-SNMP threads already running in it?  
Based on your previous response I was not sure whether you were indicating 
whether a subagent should be it's own application all the time, or simply just 
not be placed in the same application with other SNMP specific threads.

I am having trouble with the subagent running in an application which has other 
non-SNMP threads runnning at the same time and was trying to determine if 
having a subagent thread in this application was causing me trouble with it not 
being thread-safe or something.




Dave Shield <[EMAIL PROTECTED]> wrote: Date:  Wed, 1 Aug 2007 09:10:14 +0100
From: "Dave Shield"  <[EMAIL PROTECTED]>
To: "Need Help"  <[EMAIL PROTECTED]>
Subject: Re: My subagent code has a forever loop  in it which might be starving 
other functions
CC:  [email protected]

On 31/07/07, Need Help  wrote:
> Does this mean the subagent and master  agent
> should be started in the same thread, or can I start the subagent  in a
> thread of it's own and still be safe?

The whole point of  having master and subagents is that they
are two completely separate  applications.
I wouldn't run them as separate threads from the same
basic  application - better to invoke them as two completely
separate  applications.
Or at the very least, use fork() and exec() to separate them  off
from your main application driving routine.

The same would hold  true for any subsequent subagents  too.

Dave


       
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, 
when. 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to