Trust
Fri Sep 21 13:53:10 PDT 2007
I'm brand new to threads -
could you get me to a very simple tutorial or code sample that shows how to
do this and explains it very simply?
"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.215e3b15554e6df4a2@msnews.microsoft.com...
> Trust Me; I'm from the government <sm@here.com> wrote:
>> Let's say I have an event handler that spawns another thread
>> In that original event handler, is there a way to check, and do something
>> ONLY after the thread is complete?
>
> Give the thread a callback delegate to execute when it's finished. If
> you want that marshalled to a particular thread, you'll need to use
> something akin to Control.Invoke.
>
> --
> Jon Skeet - <skeet@pobox.com>
>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too