This commit is contained in:
2025-11-16 17:27:05 +08:00
parent 643a14956d
commit dbbe3303b3
665 changed files with 1697 additions and 1018 deletions
@@ -317,8 +317,8 @@ Only the most recent action is executed and previous pending actions are discard
<a id="Hi_Common_LooseRunner_TryRun_" data-uid="Hi.Common.LooseRunner.TryRun*"></a>
<h3 id="Hi_Common_LooseRunner_TryRun_System_Action_System_Threading_CancellationToken__" data-uid="Hi.Common.LooseRunner.TryRun(System.Action{System.Threading.CancellationToken})">
TryRun(Action&lt;CancellationToken&gt;)
<h3 id="Hi_Common_LooseRunner_TryRun_Hi_Common_LooseRunner_MergedCancellationTokenRun_System_Nullable_System_Threading_CancellationToken__" data-uid="Hi.Common.LooseRunner.TryRun(Hi.Common.LooseRunner.MergedCancellationTokenRun,System.Nullable{System.Threading.CancellationToken})">
TryRun(MergedCancellationTokenRun, CancellationToken?)
</h3>
@@ -328,13 +328,16 @@ If an action is already pending, it will be replaced with the new action.</p>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TryRun(Action&lt;CancellationToken&gt; action)</code></pre>
<pre><code class="lang-csharp hljs">public void TryRun(LooseRunner.MergedCancellationTokenRun action, CancellationToken? cancellationToken = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>action</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>&gt;</dt>
<dd><p>The action to run.</p>
<dt><code>action</code> <a class="xref" href="Hi.Common.LooseRunner.html">LooseRunner</a>.<a class="xref" href="Hi.Common.LooseRunner.MergedCancellationTokenRun.html">MergedCancellationTokenRun</a></dt>
<dd><p>The action to run. The input cancellation token is the merge of <code class="paramref">cancellationToken</code> and the runner hosted cancellation token that called on disposing.</p>
</dd>
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a>?</dt>
<dd><p>external cancellation token</p>
</dd>
</dl>