Skip to main content

get

Function get 

Source
pub fn get<KeyType: 'static>(keyname: impl Display) -> Option<PersistentChild>
Expand description

Get a Child process that might have been spawned in a previous reload cycle.

This function is useful if you want to access spawned processes that outlive the presently loaded configuration.

In order to get the Child, you must provide a type and a name. The type is provided in order to prevent others from accessing this child (it’s not fully safe, but it takes effort to break this), while the name is used to identify this specific Child.

For the type, you should create a new type specifically for this, and this type should not be publicly available. If the type is renamed in between reload cycles, the child will become an inaccessible zombie.