all groups > dotnet distributed apps > february 2005 >
You're in the

dotnet distributed apps

group:

Calling Events from Multi and Nested Threadded application


Calling Events from Multi and Nested Threadded application Sandeep
2/25/2005 11:35:03 PM
dotnet distributed apps:
I have a class with 4 mathods and each performes different saperate
procedures. each can be executed in a saperate thread. There are provission
to give progress feedback to user through Events.

The number of Objects for this class is dynamically generated from main
application.

There is no problem when we call all four mathods one by one. but when i
call methods from thread, it does not call events and thread allways stays
alive.

Without events threaded solution also works but i requred to give progress
infromation to the user.

So please give suggession how to resolve this problem?

Re: Calling Events from Multi and Nested Threadded application Raqofella via DotNetMonster.com
2/26/2005 9:30:41 PM
events are just like methods with one difference, they have a list of
methods which will be called during event delegation invocation (forex:
this.EventA() from 3rdThread).

so, the problem you are living can be based on a lot of different things.
you had to supply source code info, application type (console,winforms?)
and bunch of other things like:

[quoted text, click to view]

calling the methods from which thread?? though this can be assumed from the
primary thread.

[quoted text, click to view]
allways stays alive.

you mean "from worker threads"...

probably you are using winforms... so invoke the event delegates by the
particular form's Invoke method instead of directly calling them!

--
AddThis Social Bookmark Button