L_QUEUE
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall L_QUEUE(list_id[, request, ...])
Arguments
list_id
The ID of the list. (n)
request
(optional) One or more of the possible requests passed to L_PROCESS. (See the list of requests in L_PROCESS.) (n)
Discussion
L_QUEUE queues requests for the L_PROCESS subroutine. When queued requests are executed, note the following rules:
- Requests are executed in the sequence in which they are passed. This rule applies not only to the sequence of calls to this subroutine, but also to the request flag arguments that are passed to L_PROCESS.
- If L_PROCESS cannot execute one of the queued requests, all subsequent pending requests are canceled. For example, if you request D_LUP when positioned on the first item in the list (and no more items are available to load at the top), any request that was queued after the D_LUP request will be canceled.
- A maximum of 20 requests may be pending at one time. If a 21st request is queued, a fatal error occurs.
- While requests are being executed, L_PROCESS may require that more items be loaded. Such requests must be honored exactly as they are during normal list processing.
- Except for loading new items when no load method is supplied, L_PROCESS won’t return to the calling routine until either all queued requests have been performed or one of the requests could not be performed. For this reason, no “queue cancel” functionality is provided.
Examples
The following example will move to the bottom of the list before processing the append request passed directly to L_PROCESS. This example does not use a load method, so it must honor load requests.
xcall l_queue(list_id, D_LBOTTOM) ;Queue a bottom request req = D_LAPPEND ;Insert at the end call process ;Process the requests process, do begin xcall l_process(list_id, req, list_rec) case req of begincase ;D_LLOADBOT: call load ;Load requested item ;D_LLOADTOP: req = D_LEOF ;Tell L_PROCESS "none available" ;D_LABORT: req = D_LNOP ;Force exit from this loop endcase end until (req.eq.D_LNOP) return
The routine would be simplified by using a load method:
xcall l_queue(list_id, D_LBOTTOM) req = D_LAPPEND xcall l_process(list_id, req, list_rec) return