23.1 Engine Properties

The properties that control the Mozart engine are identified by atoms. For example, the current number of runnable threads is identified by the atom 'threads.runnable'. That is,

{Property.get 'threads.runnable'}

returns the number of currently runnable threads as an integer.

For convenience, most properties are organized into groups. A group is accessed by an atom giving the group's name ('threads', for example), and it returns a record containing the properties of that group. For example,

{Property.get 'threads'}

returns a record that has several features one of which is 'runnable'.

Some properties are read-only. They provide access to statistical information (as the property 'threads.runnable' in our previous example), but cannot be used to update that information. Other properties are mutable: changing their values customizes the engine's behaviour. For example, the property 'threads.medium' gives the ratio between the number of time slices available for threads of priorities medium and low. This can be changed to 2:1 by:

{Property.put 'threads.medium' 2}

Property.put supports groups as well. For example, to customize time slices for threads of all priorities, we can do:

{Property.put 'threads' foo('medium': 2
                            'high':   2)}

The record's label is not significant.

All properties are listed in the following sections, which are sorted by group.

Denys Duchier, Leif Kornstaedt, Martin Homik, Tobias Müller, Christian Schulte and Peter Van Roy
Version 1.4.0 (20080702)