Go to the first, previous, next, last section, table of contents.


queueJob

Control-struct: queueJob { job jobQueue -> }
file: job.t
package: muf
status: tentative

The queueJob operator removes job from whatever job-queues it is currently in, and then inserts it into jobQueue. Moving a job into some arbitrary jobQueue is one way to stop it from running. (It may get woken by signals, however.) Moving it into a "run" jobQueue (for example, me$s.runQueue1) is a way to start it running again.

(Note: Since there are actually multiple run-queues for each user, and a job should always go in the queue matching its priority, the queueJob operator silently puts the job in the right jobQueue, even if it is not the one specified.)

Stack:
makeJobQueue --> q
Stack:
copyJob dup if --> j j q queueJob else pop 2000 sleepJob nil endJob fi
Stack:
j me$s.runQueue0 queueJob
Stack:

Here, the copyJob line leaves job j in suspended animation in jobQueue q, and the next line releases it and lets it run to completion. You can use the printJobs (pj) command to observe jobstate.


Go to the first, previous, next, last section, table of contents.