tell other thread to execute method

R

roni

hi.
i have applcation in net.
in that application i have 3 threads.

1- main thread with message loop and form
2. thread with message loop and form
3. thread with message loop and form


now ,i want thread 2 to tell thread 3 to exceute method in async way :

how can i do that ?

if i will use the asnyc call through NET , that thread that will exceute the
method will be
thread from thread pool.

any ideas ?
 
R

roni

roni said:
hi.
i have applcation in net.
in that application i have 3 threads.

1- main thread with message loop and form
2. thread with message loop and form
3. thread with message loop and form


now ,i want thread 2 to tell thread 3 to exceute method in async way :

how can i do that ?

if i will use the asnyc call through NET , that thread that will exceute the
method will be
thread from thread pool.

any ideas ?
 
W

Wessel Troost

The easiest way would be an asynchronous message call. Create a delegate
that points to the method you want to invoke asynchronously, and call
BeginInvoke() on the delegate. This will return control immediately
while the asynchronous call executes in another thread (not necessarily
thread 1, 2 or 3 tho.)

Greetings,
Wessel

-----Original Message-----
From: roni [mailto:[email protected]]
Posted At: Monday, April 11, 2005 10:10 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: tell other thread to execute method
Subject: tell other thread to execute method

hi.
i have applcation in net.
in that application i have 3 threads.

1- main thread with message loop and form
2. thread with message loop and form
3. thread with message loop and form


now ,i want thread 2 to tell thread 3 to exceute method in async way :

how can i do that ?

if i will use the asnyc call through NET , that thread that will exceute
the
method will be
thread from thread pool.

any ideas ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top