<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">suspend </span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><ahref="do-with-suspending.html">T</a><spanclass="token operator">></span><spandata-unresolved-link="kotlinx.coroutines.channels/Channel///PointingToDeclaration/">Channel</span><spanclass="token operator"><</span><spanclass="token keyword">suspend </span><spanclass="token punctuation">(</span><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="do-with-suspending.html"><spanclass="token function">doWithSuspending</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">action<spanclass="token operator">: </span><ahref="-actor-action/index.html">ActorAction</a><spanclass="token operator"><</span><ahref="do-with-suspending.html">T</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="do-with-suspending.html">T</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/MicroUtils/blob/master//coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/ActionsActor.kt#L38">source</a>)</span></span></div><pclass="paragraph">Must be use with actor created by <ahref="create-actions-actor.html">createActionsActor</a> or <ahref="create-safe-actions-actor.html">createSafeActionsActor</a>. Will send lambda which will execute <ahref="do-with-suspending.html">action</a> and return result.</p><h4class="">See also</h4><divclass="table"><divclass="table-row"data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain"data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/index.html"><span>suspend</span><wbr></wbr><span><span>Coroutine</span></span></a></div></span></div><div></div></div></div><divclass="table-row"data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain"data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="safely.html"><span><span>safely</span></span></a></div></span></div><div></div></div></div></div></div></div>