You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Returns <c>true</c> is this task source has entered its final state, i.e. <see cref="TrySetResult(bool)"/> or <see cref="TrySetException(Exception, bool)"/>
55
+
/// Returns <c>true</c> is this task source has entered its final state, i.e. <see cref="TrySetResult(bool)"/> or <see cref="TrySetException(Exception)"/>
56
56
/// was called with <c>final</c> set to <c>true</c> and the result was propagated.
// Signal the final task only if we don't have another result in the value task source.
195
-
// In that case, the final task will be signalled after the value task result is retrieved.
196
+
// In that case, the final task will be signaled after the value task result is retrieved.
196
197
if(state!=State.Ready)
197
198
{
198
199
_finalTaskSource.TrySignal(out_);
@@ -226,15 +227,14 @@ public bool TrySetResult(bool final = false)
226
227
}
227
228
228
229
/// <summary>
229
-
/// Tries to transition from <see cref="State.Awaiting"/> to either <see cref="State.Ready"/> or <see cref="State.Completed"/>, depending on the value of <paramref name="final"/>.
230
-
/// Only the first call is able to do that with the exception of <c>TrySetResult()</c> followed by <c>TrySetResult(true)</c>, which will both return <c>true</c>.
230
+
/// Tries to transition from <see cref="State.Awaiting"/> to <see cref="State.Completed"/>, setting an exception.
231
+
/// Only the first call is able to do that.
231
232
/// </summary>
232
-
/// <param name="final">Whether this is the final transition to <see cref="State.Completed" /> or just a transition into <see cref="State.Ready"/> from which the task source can be reset back to <see cref="State.None"/>.</param>
233
233
/// <param name="exception">The exception to set as a result of the value task.</param>
234
234
/// <returns><c>true</c> if this is the first call that set the result; otherwise, <c>false</c>.</returns>
0 commit comments