<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">K</a><spanclass="token punctuation">, </span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">V</a><spanclass="token operator">></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">MutableMap</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">K</a><spanclass="token punctuation">, </span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">V</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="as-key-value-repo.html"><spanclass="token function">asKeyValueRepo</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">locker<spanclass="token operator">: </span><ahref="../dev.inmo.micro_utils.coroutines/-smart-r-w-locker/index.html">SmartRWLocker</a><spanclass="token operator"> = </span>SmartRWLocker()</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="-key-value-repo/index.html">KeyValueRepo</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">K</a><spanclass="token punctuation">, </span><spanclass="token keyword"></span><ahref="as-key-value-repo.html">V</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/MicroUtils/blob/master//repos/inmemory/src/commonMain/kotlin/dev/inmo/micro_utils/repos/MapKeyValueRepo.kt#L152">source</a>)</span></span></div><pclass="paragraph"><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">MutableMap</a>-based <ahref="-key-value-repo/index.html">KeyValueRepo</a>. All internal operations will be locked with <ahref="as-key-value-repo.html">locker</a></p><pclass="paragraph"><strong>Warning</strong>: It is not recommended to use constructor with both <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">MutableMap</a> and <ahref="../dev.inmo.micro_utils.coroutines/-smart-r-w-locker/index.html">SmartRWLocker</a>. Besides, in case you are using your own <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html">MutableMap</a> as a <spandata-unresolved-link="dev.inmo.micro_utils.repos//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> you should be careful with operations on this <spandata-unresolved-link="dev.inmo.micro_utils.repos//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span></p></div></div>