What's required for a non-threaded AgentX++ subagent?

James Brokenbek jbrokenbek____celion.com
Fri May 9 18:27:44 CEST 2003


Frank,

I've decided to investigate the ThreadPool-of-size-one suggestion you
made earlier.  Let me clarify that I want single-threaded behavior not
because of concurrency issues, but rather because my platform, FreeBSD
4.3, apparently has a leaky pthreads implementation.  This rules out
repeated thread creation/destruction operations.

So then, will your suggestion keep a single thread running indefinitely,
or will it allow the single "pooled" thread to exit and then start a new
one to "refill the pool"?   A cursory check of the code suggests to me
that the latter is the case.  Could you please clarify?  Thanks.

James Brokenbek
Celion Networks, Inc.
Richardson, TX

> -----Original Message-----
> From: Frank Fock [mailto:Frank.Fock____t-online.de]
> Sent: Monday, April 28, 2003 5:44 PM
> To: James Brokenbek
> Cc: agentpp-dl____agentpp.com
> Subject: Re: What's required for a non-threaded AgentX++ subagent?
> 
> 
> James,
> 
> Theoretically, it is possible to implement a
> single-threaded AgentX++ subagent. However with
> the current version, a couple of code modifications
> will be needed. Since the master agent relies on
> a multi-threaded environment, you will have to
> separate any master specific code from the AgentX++
> library and remove it.
> 
> I will provide the necessary modifications in the
> next AgentX++ release on macro definition basis.
> The necessary Makefiles will also be provided.
> 
> As a quick workaround, you could also use the multi-threaded
> library and reduce the ThreadPool size to one. You will
> then use POSIX threads but, the subagent will behave as
> if it was compiled without threads (single-threaded).
> 
> Hope this helps.
> 
> Best regards,
> Frank



More information about the AGENTPP mailing list