instance_pool
Vars | |
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. |
Procs | |
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. |
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.