Space Station 13 - Modules - TypesVar Details - Proc Details

instance_pool

Vars

available_instancesInternal. A fixed size sparse list of instances ready to be checked out.
configuratorsConfigurable. List of paths. If set, becomes (path => instance).
instance_pathConfigurable. Path. The path of the instances this pool manages.
instance_pool_flagsConfigurable. A field of the constants below.
next_instanceInternal. The index to check out next. If 0, we start creating new ones.
pool_sizeConfigurable. Natural. The maximum number of instances this pool will retain.

Procs

GetInstanceSealed. Get an instance from the pool, creating a new one if needed, applying configurator if supplied.
OnGetInstanceVirtual. Manipulate a newly checked out instance in a common way.
OnReturnInstanceVirtual. Manipulate a newly returned instance in a common way, such as to clean it of timers.
ReturnInstanceSealed. Re-add instance to the pool if it's not full. Only one use, below, in datum/Destroy.

Var Details

available_instances

Internal. A fixed size sparse list of instances ready to be checked out.

configurators

Configurable. List of paths. If set, becomes (path => instance).

instance_path

Configurable. Path. The path of the instances this pool manages.

instance_pool_flags

Configurable. A field of the constants below.

next_instance

Internal. The index to check out next. If 0, we start creating new ones.

pool_size

Configurable. Natural. The maximum number of instances this pool will retain.

Proc Details

GetInstance

Sealed. Get an instance from the pool, creating a new one if needed, applying configurator if supplied.

OnGetInstance

Virtual. Manipulate a newly checked out instance in a common way.

OnReturnInstance

Virtual. Manipulate a newly returned instance in a common way, such as to clean it of timers.

ReturnInstance

Sealed. Re-add instance to the pool if it's not full. Only one use, below, in datum/Destroy.