Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > tell other thread to execute method

Reply
Thread Tools

tell other thread to execute method

 
 
roni
Guest
Posts: n/a
 
      04-11-2005
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 ?





 
Reply With Quote
 
 
 
 
roni
Guest
Posts: n/a
 
      04-11-2005

"roni" <(E-Mail Removed)> wrote in message
news:d3ehll$lss$(E-Mail Removed)...
> 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 ?
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Wessel Troost
Guest
Posts: n/a
 
      04-12-2005
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 [(E-Mail Removed)]
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 ?





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a method to tell me the name of the method I'm in? Xeno Campanoli Ruby 3 06-11-2009 03:42 AM
Question on multi-thread execute the same method of same classinstance QQ Java 6 03-28-2008 02:56 PM
thread.start() does not actually execute the assigned method =?Utf-8?B?Y2hyaXN2Yw==?= ASP .Net 4 06-10-2007 11:54 AM
Can i execute aspx file in my asp pag with server.execute method(sorry) Savas Ates ASP General 1 08-17-2004 04:52 PM
How to tell a Thread to quit if the Thread is blocking on IO? metfan Java 9 11-02-2003 09:45 AM



Advertisments