SceneWorkRunner

Runs a document's GUI-thread work in slices (scene-tree-model-view §TMA-8).

Inherits QObject

In the namespace construct::document. Declared in src/libs/libconstruct/construct/document/SceneWorkRunner.hpp.

Detailed description

A unit is a bounded piece of work that can resume: it returns true when it is done and false when there is more. The runner runs units until kSliceMs pass, then yields with a zero timer, so the event loop paints and takes input between slices.

- A unit carries a key. While a unit with that key is queued, a new one is dropped: the queued one reads the state when it runs, so it sees the newer change. addItems() gives the queued unit the items of the newer change. - First in, first out per kind. Every structural unit runs before any evaluation unit. - A unit's items are busy from the moment it is queued until it is done (§TMA-5), through the busy sink. - A hold pauses the runner: an OPAL plan or a structure batch. - A unit that runs longer than one slice is reported once per key: a warning and stalled(). The gesture harness fails on it (§TMQ-4).

The runner does not replace BatchQueue, which runs jobs on worker threads with resource admission. Work that can leave the GUI thread is a batch job.

In this section