|
If your no-op loop is waiting on a data queue (i.e. it contains a call to QRCVDTAQ with the WAIT parameter set to -1) then the program will stop at the QRCVDTAQ call and it won't consume any CPU cycles anyway - it just goesto DEQW (dequeue-wait) status and won't fo anything until a data queue entry is added to the data queue
Absolutely! However, the original post had DoW 1 = -1 If data queue is not full leave EndIf EndDoIt wasn't apparent that there's a QRCVDTAQ in there, and the further clarification noted that this was intended to slow down the process doing the QSNDDTAQ. Thus the concern that the job filling the queue is going to merely consume CPU until the queue drops below a certain threshold and the suggestion for DLYJOB or wait() until the (associated but separate) receiving job can catch up.
In a broadening of the increasingly misnamed thread, it is also possible to add more listener jobs to draw down the queue faster. This can even be automated via use of time stamps in the queue entries. If process A receives an entry older than (pick a time... a minute) then process A does a SBMJOB to create another process. If process B does enough (pick a number, say 10) QRCVDTAQ's that return no data, then process B can SETON LR and clean itself up, thus self-regulating the consumption of data queue entries.
--buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.