Scoped configuration

Base.getindexMethod
getindex(cfg::ScopedConfig)

Read the active value of a ScopedConfig: the innermost task-scoped override when inside a with_* block, otherwise the global default (read atomically).

Algorithm

  1. Read cfg.scoped[], the innermost task-scoped override, giving nothing outside every with_* block.
  2. When step 1 gives nothing, read cfg.default atomically instead.

Returns

  • x::T: The active value of the configuration.

Related

source