[#BloombergLP-balm-MetricRegistry-setCategoryEnabled]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricRegistry.adoc[MetricRegistry]::setCategoryEnabled
:relfileprefix: ../../../
:mrdocs:

Set whether `category` is enabled to `value`&period;

== Synopsis

Declared in `&lt;balm&lowbar;metricregistry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setCategoryEnabled(
    xref:BloombergLP/balm/Category.adoc[Category] const* category,
    bool value);
----

== Description

Set whether the specified `category` is enabled to the specified `value`&period; The behavior is undefined unless `category` is a valid address of a category previously returned by this metric registry&period; Note that this operation is thread&hyphen;safe, but _not_ atomic&colon; Other threads may simultaneously access the current enabled value for `category` while this operation completes&period; Also note that this operation has _linear_ runtime performance with respect to the number of registered category holders for `category`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| category whose enabled state is set
| *value*
| new enabled state for `category`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
