Re: multi threading in C#
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Wed, 23 May 2007 23:08:33 +0100
Vinki <Vinki@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I just started learning Threading in C#. I read lot of articles and what I
am trying to accomplish here is
that I have an array of string and I want to pass the member of that array
to each thread one by one until the processing is done.
how can I pass the values one by one to myThreadprocess1 and as soon as one
thread is done with the process,
it should grab another item from array and process that item. How can I
accomplish this? Below is my code:
It sounds like you want a producer/consumer queue, or something like
it. See the second half of this page:
http://pobox.com/~skeet/csharp/threads/deadlocks.shtml
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: multi threading in C#
- From: Peter Duniho
- Re: multi threading in C#
- Prev by Date: Re: Serialization vs. program updates
- Next by Date: Re: When is "volatile" used instead of "lock" ?
- Previous by thread: Read Excel Data Using ASP.net 2.0 C#
- Next by thread: Re: multi threading in C#
- Index(es):
Relevant Pages
|