Home > Archive > C# .NET > April 2004 > Thread start and Finished Notification
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Thread start and Finished Notification
|
|
|
| Hi,
Was wondering if its possible to have a event notification in Thread when
the thread is about to start and the thread has just finished doing its work
and about to terminate.
If its not directly available, I was thinking to derive a class form Thread
and provide this events, but again its a sealed class. Is there a way to do
this?
I do not want to waste time pooling or waiting for the other thread to
finish I can rather so someting useful.
Any help is most welcome.
Regards
Kiran
| |
| Fitim Skenderi 2004-04-05, 8:34 am |
| Hi Kiran,
Just declare the events in your main code, then when the thread starts it
can trigger the event asynchronously using BeginInovke method of your event.
Same when the thread finishes the job.
hope this helps
Fitim Skenderi
"Kiran" <kirann@abc.com> wrote in message
news:ujOelfvGEHA.4008@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Was wondering if its possible to have a event notification in Thread
when
> the thread is about to start and the thread has just finished doing its
work
> and about to terminate.
> If its not directly available, I was thinking to derive a class form
Thread
> and provide this events, but again its a sealed class. Is there a way to
do
> this?
> I do not want to waste time pooling or waiting for the other thread to
> finish I can rather so someting useful.
>
> Any help is most welcome.
>
> Regards
> Kiran
>
>
>
| |
| Kiran 2004-04-05, 10:35 am |
| Hi,
Will this kind of helped, Now I created my own class that wraps this
Thread class & the Execute method.
Thanks Again
Kiran
"Fitim Skenderi" <fitims@hotmail.com> wrote in message
news:ex9wNRwGEHA.2052@TK2MSFTNGP12.phx.gbl...
> Hi Kiran,
>
> Just declare the events in your main code, then when the thread starts it
> can trigger the event asynchronously using BeginInovke method of your
event.
> Same when the thread finishes the job.
>
> hope this helps
>
> Fitim Skenderi
>
>
|
|
|
|
|