thenQueue

fun <T> NodeBuilder<T, *>.thenQueue(label: String, policy: QueuePolicy<T> = FIFOQueuePolicy()): RegularNodeBuilder<QueueNode<T>, T, ChannelType.Pull>

Attaches an unbuffered queue (infinite capacity) into the builder chain, which can then be continued after this call.

Simulates a holding area / buffer, which when used with other nodes can construct:

  • within a bounded subnetwork -> parking lot to store port vehicles while not in use

  • combined with a fork node -> buffers or queues of vehicles waiting to pass through a gate or to be dispatched to a service node

Parameters

policy

Controls the behaviour of the queue, i.e., prioritising certain vehicles to exit the queue before others.