I have an ASPX page that calls a .NET DLL that in turns subscribes to a third party information service through an object that reacts to events asynchronously. I need my ASPX (or .NET DLL) code to hold on execution until the asychronous event has been called...
In short, what I need is to wrap an asychronous component into a synchronous one, so that my calling application can execute properly. I am creating a new thread on the DLL when I create an instance of the third party asychronous component; however -- it looks
like the events triggered by this object are either never been executed or they are being executed on the caller's thread, which i have purposely stopped on a loop waiting for the event to be called. As a result, I never see my event being executed if i freeze
my main thread; if i dont freeze it (on the infinite loop) then my event is, again, executed asynchronously. Do you guys know of any way to solve this problem, or any work around? Thanks -- Javier
"Never argue with an idiot; He will drag you down to his level and beat you with experience"
You need to know why the events are not being received or Fired, First make sure the event(s) are firing, write to the EventLog to check, check the thread id. Now once you have made tthe above checks you will be able to determine what thead is receiving the
events, you must not block the UI Thread, I'm interested to see who getting the events ?. I highly recommend the Application.Block Frameworks for any things Asynchronously. Regards Robin.
javiguillen
Contributor
2432 Points
526 Posts
Threads and Events
May 25, 2004 01:24 PM|LINK
teststand
Member
375 Points
75 Posts
Re: Threads and Events
Jun 14, 2004 10:08 AM|LINK