Critical sections in the bc::chain type system support caching of costly-to-compute computed properties (such as .hash()). This optimizes for CPU while not sacrificing code clarity. It is protected to allow safe concurrent reading of the object, since the properties are computed on read, and allows safe invalidation when underlying properties change.