Pauseable Zero Delay Multiservers

From Planimate Knowledge Base
Jump to navigation Jump to search

Pauseable 0 Delay is an advanced user option that configures the MultiServer to enable "zero-time" logic to be paused. This is very useful for debugging.

Using this option, you can specify in a very controlled manner, "pauseable points" in a long processing sequence which runs in zero time.

Single capacity MultiServers with the "Pauseable Zero Delay" option set and a zero delay can be used in a Dynamic Panel or an Application Panel.

When you select this option:

  • The delay of the multiserver for ALL item classes is set to Zero.
  • MultiServer capacity is set back to 1
  • The MultiServer Show as Road option is turned on.
  • The engine is instructed that a pause is OK at this object


This last element is important, because usually when the user requests a model run to pause, a pending zero time delay will be processed, and the item moved on to the next point of capacity before the pause is effected. With this option set, if the user requests a pause as an item is heading to this object, the item will be held there.

Zero delay single capacity multiservers in application panels

In an Application Panel, MultiServers by default are configured with a pauseable 0 time delay and "road view". MultiServers in Application panels cannot have the Pauseable 0 Delay option changed.


Internal Treatment of Zero Delay MultiServers

A MultiServer with a zero delay schedules a priority event which is posted ahead of any other events at the current time. This makes it much more likely that the next thread to execute after the item reaches the multiserver is the item leaving the multiserver.


Places you cannot use a Zero Delay MultiServer

There is a check to the pauseable zero delay multiservers to flag an error if a pauseable zero delay is attempted in a background thread (eg: a timer tick or a panel open/closed broadcast). Pauseable activity is not allowed in these threads for obvious reasons.