Async ASP

Results 1 to 3 of 3

Thread: Async ASP

  1. #1
    Sean Colonello Guest

    Default Async ASP

    How do I (or can I?) make a script "go to sleep" and wait for an event to be raised from an object (COM)?<BR><BR>I don&#039t want to spin in a loop checking for completion of the task (expensive), just want to idle until I&#039m told the job is done...<BR><BR>Any ideas GREATLY appreciated.

  2. #2
    soser Guest

    Default RE: Async ASP

    Are you writing the COM component? If so, you can make the COM do the event check, then once triggered, the COM method would only return a value once complete? So when you call the method like this:<BR><BR>x = MyCom.MyMethod<BR><BR>The code will stop until x has a value.<BR><BR>If you are using a third party component, many of them have the component return some sort of status value that you can use.<BR><BR>It might also be helpful to know what you are trying to do.

  3. #3
    Sean Colonello Guest

    Default RE: Async ASP

    Yes, I&#039m writing the COM component (preferrable in VB, but I&#039ll resort to C++ if I have to). Not sure I follow you, how do I do an "event check"? Is there some way to make code wait for an event at a particular line? I thought you could only respond to events via an event handler. Here&#039s my situation...<BR><BR>I have existing COM components that do screen scraping against an airline host (i.e. slow response). For efficiency reasons, these were designed to work asynchronously; the consumers of my component (currently a Win32 client) would call MyCom.MyMethod (which returns a status stating whether the request was queued up successfully) then go about it&#039s business. When the queued request is complete, the MyCom.MyMethodComplete EVENT is raised with any required return values as params to the event handler.<BR><BR>Example: Consumer code (VB GUI client) makes 2 calls to my GetFlightAvailability() function (one for outbound flights, one for return flights), which queues up those requests. When each flight availability request is complete a GetFlightAvailabilityComplete() EVENT is raised and the VB GUI displays the flight info on the screen.<BR><BR>I&#039m creating a "booking engine" API to be used in web sites, so I need some way to either: a) remove the asynchronisity OR b) find a way for the scripting language (i.e. VBScript) to deal with async.<BR><BR>Hope that helps clarify, might just confuse though... Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts