The main thread spawns a thread. So there could be many threads. Each thread
calls a download function. But this downloadfunction has a mutex hence only
one thread at any one time can have access. I was going to have some
consumer-producer queueing but I got idle. Its ok. Produces threads but they
are all independant and are "serialised" when downloading.
Oh well cheap and ugly but less complex.

Cheers,
Garyc
----- Original Message -----
From: "Robert Story (Users)" <[EMAIL PROTECTED]>
To: "Gary Clark" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 2004 2:06 PM
Subject: Re: Sending traps in another thread


> On Thu, 28 Oct 2004 08:20:09 -0500 Gary wrote:
> GC> >>When a set request is received by the agent to download an image to
> GC> hardware
> GC> >>a function call is made to download.
> GC> >>Within this download function I have the mutex to lock to prevent
> GC> >multiple>requests to download and then I spawn a thread that
downloads the
> GC> >image to>the hardware device. Once complete the lock is disabled. The
> GC> >thread>resources are removed once the thread exits.
> GC>
> GC> This is what I sent out yesterday. Yes your both correct. The main
thread
> GC> however is blocked as stated in the above text.
>
> Ah, ok. Then you should be ok, but I have to ask why you have a thread at
all,
> if the main agent is blocked anyways?
>
> --
> Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
> <irc://irc.freenode.net/#net-snmp>
> Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>
>
> You are lost in a twisty maze of little standards, all different.
>
>
> -------------------------------------------------------
> This Newsletter Sponsored by: Macrovision
> For reliable Linux application installations, use the industry's leading
> setup authoring tool, InstallShield X. Learn more and evaluate
> today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
> _______________________________________________
> Net-snmp-users mailing list
> [EMAIL PROTECTED]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users



-------------------------------------------------------
This Newsletter Sponsored by: Macrovision 
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate 
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to