Re: Passing parameters to a thread

From: Sriram Krishnan (ksriram_at_NOSPAMgmx.net)
Date: 10/14/04


Date: Thu, 14 Oct 2004 18:50:59 +0530

You have 2 options.

1. Use the ThreadPool and the WaitCallback delegate

2. Use .NET 2.0 and use the ParameterizedThreadStart i.e if you have the
option of using .NET 2.0

Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram

"Arno" <Arno@discussions.microsoft.com> wrote in message
news:8A71B593-4BF4-49E6-B9BA-C65B5B770759@microsoft.com...
> Hi,
>
> I'm running into a thread problem. The context is a distributed
> application
> constituted of a controller and several satellites performing a given job.
>
> In the controller application, I have to send command requests over the
> network to a list of satellites. In order to parallelize request sending,
> I'd
> like to have each request (one per satellite) sent by a single Thread. The
> problem is how would a given thread know which satellite he should be
> taking
> care of since it seems like I can't pass parameters to a thread.
>
> My threads can have access to the list (a Hashtable actually) of
> satellites,
> but how would a given thread know exactly which one it should be taking
> care
> of ? I would need, at least, to pass an index to each thread...
>
> Any idea or comment is welcome.
> Thanks in advance.
> Arno



Relevant Pages

  • RE: Passing parameters to a thread
    ... Your should manage it so each request is an object with ... >In the controller application, ... >network to a list of satellites. ... should be taking care ...
    (microsoft.public.dotnet.framework)
  • Re: Passing parameters to a thread
    ... > I'm running into a thread problem. ... > constituted of a controller and several satellites performing a given job. ... In order to parallelize request sending, ...
    (microsoft.public.dotnet.framework)
  • Passing parameters to a thread
    ... I'm running into a thread problem. ... constituted of a controller and several satellites performing a given job. ... In order to parallelize request sending, ...
    (microsoft.public.dotnet.framework)