MCPcopy Index your code
hub / github.com/simstudioai/sim / pushQueuedExecution

Function pushQueuedExecution

apps/sim/lib/execution/isolated-vm.ts:545–563  ·  view source on GitHub ↗
(owner: OwnerState, queued: QueuedExecution)

Source from the content-addressed store, hash-verified

543}
544
545function pushQueuedExecution(owner: OwnerState, queued: QueuedExecution) {
546 const node: QueueNode = {
547 ownerKey: owner.ownerKey,
548 value: queued,
549 prev: owner.queueTail,
550 next: null,
551 }
552 if (owner.queueTail) {
553 owner.queueTail.next = node
554 } else {
555 owner.queueHead = node
556 }
557 owner.queueTail = node
558 owner.queueLength++
559 owner.burstRemaining = 0
560 addOwnerToRing(owner.ownerKey)
561 queueNodes.set(queued.id, node)
562 queueSize++
563}
564
565function selectOwnerForDispatch(): OwnerState | null {
566 if (queuedOwnerRing.length === 0) return null

Callers 1

enqueueExecutionFunction · 0.85

Calls 2

addOwnerToRingFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected