On Thu, 17 Oct 2019 08:54:11 -0400, Thomas David Rivers <riv...@dignus.com> wrote:
>Does anyone happen to know the best way for a running task >to give up running and let another task run? > >But - this isn't "give up" as in ending the task, just giving up >the CPU to allow another task to run and then returning to this >task. > >Sorta like "I'm done for the moment if something else would like to run". Is the task one that purely uses CPU? Perhaps looping, looking at a queue for something to do, without ever waiting for anything? If so, perhaps it should issue STIMER WAIT when it detects that it has nothing to do. If, OTOH, it waits for an ECB to be posted, or an I/O to complete, or any of a number of other things, it is already relinquishing control. -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN