Canceling asynchronous requests after a specified time
- Last Updated: January 27, 2016
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The CANCEL-REQUESTS-AFTER( ) method allows you
to specify the number of seconds to wait before calling the CANCEL-REQUESTS( ) method on the server object. This feature allows you to
prevent calls from taking too much time when the call must be completed in a timely
manner. When called, the CANCEL-REQUESTS-AFTER( ) method
ensures that all requests currently running, or that are queued to run, for this client
on the server will be canceled after the specified number of seconds have elapsed,
regardless of when they were started.
If the method is called on a server object that already has a
CANCEL-REQUESTS-AFTER( ) timer running, the timer is restarted with
the new time interval, measured from the moment of method execution.
If the method is called with a parameter whose value is less than or equal to zero, then the timer on the server object is stopped.
Calling this method on a server object has no immediate effect on any asynchronous requests that are currently running (or queued to run) on that server object. Moreover, the length of time these requests have already been running prior to the call does not effect the timer.
The method may be called before or after the asynchronous requests
are run. Any asynchronous requests that are run after the method
is called must complete before the timer expires. The time available
to complete such a request depends on when it was executed, with
respect to the CANCEL-REQUESTS-AFTER( ) method
call.
The timer has no effect on requests run synchronously during the time interval. Synchronous requests are not canceled, even if they run longer than the specified timeout.
Manually calling the CANCEL-REQUESTS( ) method
in the application program during the timeout period has no effect
on the timer.