Re: Joining threads; why?
From: Eric Sabine (mopar41_at_mail_after_hot_not_before.com)
Date: 10/08/04
- Next message: John E.: "How to change a populated DataColumn UnderlyingSystemType (app)"
- Previous message: Gas: "Character representation"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 8 Oct 2004 11:33:31 -0400
OK those seem like two good examples of joining background threads. Thanks.
What about joining a worker with the UI thread. Do you ever do that?
Nicholas Paldino [.NET/C# MVP] wrote:
> Eric,
>
> It depends on what you are trying to do. One example I can think
> of would be when you have two unrelated sets of data which you need
> to process. You have to process both of them, and then perform a
> third process. The first and the second are unrelated, but the third
> can't be executed until the first two are processed.
>
> As a really simple example, let's say you have two proprietary
> structured files, which you want to join into a data set and for some
> reason. You could parse one file on one thread, and another on
> another thread. You would then wait until they were both parsed to
> add them into the data set. In that case, you would join on the
> other threads doing the work, waiting for them to complete so you
> could proceed with the merge.
> Hope this helps.
>
>
>
> "Eric Sabine" <mopar41@mail_after_hot_not_before.com> wrote in message
> news:eX3B7jUrEHA.1644@tk2msftngp13.phx.gbl...
>> Can someone give me a practical example of why I would join threads?
>> I am assuming that you would typically join a background thread with
>> the UI thread and not a background to a background, but since I'm
>> asking in the first place, assume that assumption to be very
>> assuming. thanks,
>> Eric
- Next message: John E.: "How to change a populated DataColumn UnderlyingSystemType (app)"
- Previous message: Gas: "Character representation"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Joining threads; why?"
- Messages sorted by: [ date ] [ thread ]