M
Mountain Bikn' Guy
I'm using async delegate calls. I would like to re-enter my initial thread
after the callback. (I'm not using UI controls, so Control.Invoke is not the
solution.) How can I manually implement behavior like Control.Invoke? How
can I re-enter my initial thread? Any suggestions?
Thanks!
Mountain
I already searched Google Groups and found something on this topic, but no
solution:
http://groups.google.com/groups?hl=...ff&selm=#[email protected]
Here's the most relevant prior post I found (again, no solution):
From: Lior Amar ([email protected])
Subject: Re: Threads and Delegates
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.dotnet.languages.vb
Date: 2003-09-29 16:24:04 PST
Hey Peter,
Thanks for the links but these explain more on shared resources. Not really
having issues with multi-threading as is. More interested on making my
thread reentrant. Tried even overriding marshalling but nothing doing. Super
simple to thread in .NET but man is it tough to re-enter a thread. I know it
can be done with a Form/Component with the BeginInvoke. Tried that with
delegates but it doesn't do it. Did learn that if you try enough Async
delegate invokation that sooner or later the delegate call will be made on a
different thread also. Also found that you can make recursive
delegates....not recommended though
Whatever approach I take, I can not get the call to reenter my initial
thread. I'm doing this with C++ and an ATL component but I would rather a
complete VB.NET solution.
Things I've tried so far:
1. Delegates
2. Shared Resources
3. Inheriting the RealProxy and Implementing the IRemotingTypeInfo to try
and create a Single Threaded object using MarshalByRefObject.
4. ContextBoundObject
5. Sacrificing a small animal
Best results so far have been with #5
I've pretty much just gone with my C++ workaround but plan on working on it
more on my free time. It just seems like something that shouldn't be that
difficult!
Any ideas on what else I should try...Would love to know what the
Form/Component.BeginInvoke does to reenter it's thread
Thanks,
Lior
after the callback. (I'm not using UI controls, so Control.Invoke is not the
solution.) How can I manually implement behavior like Control.Invoke? How
can I re-enter my initial thread? Any suggestions?
Thanks!
Mountain
I already searched Google Groups and found something on this topic, but no
solution:
http://groups.google.com/groups?hl=...ff&selm=#[email protected]
Here's the most relevant prior post I found (again, no solution):
From: Lior Amar ([email protected])
Subject: Re: Threads and Delegates
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.dotnet.languages.vb
Date: 2003-09-29 16:24:04 PST
Hey Peter,
Thanks for the links but these explain more on shared resources. Not really
having issues with multi-threading as is. More interested on making my
thread reentrant. Tried even overriding marshalling but nothing doing. Super
simple to thread in .NET but man is it tough to re-enter a thread. I know it
can be done with a Form/Component with the BeginInvoke. Tried that with
delegates but it doesn't do it. Did learn that if you try enough Async
delegate invokation that sooner or later the delegate call will be made on a
different thread also. Also found that you can make recursive
delegates....not recommended though
Whatever approach I take, I can not get the call to reenter my initial
thread. I'm doing this with C++ and an ATL component but I would rather a
complete VB.NET solution.
Things I've tried so far:
1. Delegates
2. Shared Resources
3. Inheriting the RealProxy and Implementing the IRemotingTypeInfo to try
and create a Single Threaded object using MarshalByRefObject.
4. ContextBoundObject
5. Sacrificing a small animal
Best results so far have been with #5
I've pretty much just gone with my C++ workaround but plan on working on it
more on my free time. It just seems like something that shouldn't be that
difficult!
Any ideas on what else I should try...Would love to know what the
Form/Component.BeginInvoke does to reenter it's thread
Thanks,
Lior