MCPcopy Index your code
hub / github.com/danslimmon/qsim / Shift

Method Shift

queue.go:59–70  ·  view source on GitHub ↗

Shift removes a Job from the head of the queue. It returns the Job that was removed, as well as the number of Jobs still left in the queue after shifting. When Shift is called on an empty queue, j will be nil. So an appropriate use of Shift looks like this: j, nrem := q.Shift() if j != nil { Do so

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

TestQueueShiftFunction · 0.95
TestQueueBeforeShiftFunction · 0.95
TestQueueAfterShiftFunction · 0.95
TestShortestQueueArrBehFunction · 0.80

Calls 2

beforeShiftMethod · 0.95
afterShiftMethod · 0.95

Tested by 6

TestQueueShiftFunction · 0.76
TestQueueBeforeShiftFunction · 0.76
TestQueueAfterShiftFunction · 0.76
TestShortestQueueArrBehFunction · 0.64