16.1 Custodians
import: rhombus/custodian | package: rhombus-lib |
A custodian manages objects such as threads, file-stream ports, network connections, and other custodians. Whenever a thread, etc., is created, it is placed under the management of the current custodian as determined by the Custodian.current parameter.
A custodian box created with Custodian.Box strongly holds onto a value placed in the box until the box’s custodian is shut down.
class | ||
|
A new custodian is always created with some existing custodian as its parent. If the parent custodian is shut down, then the child is shut down, too.
method | |
| |
method | |
The Custodian.is_shutdown method reports whether a custodian has been shut down already. A custodian that has been shut down cannot become the owner of new objects.
context parameter | |
class | |||
|