Skip to content

Commit d6abb40

Browse files
authored
Fixed formatting of CancellationTokenSource.TryReset remarks (dotnet#8087)
1 parent 5476124 commit d6abb40

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

xml/System.Threading/CancellationTokenSource.xml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -945,20 +945,19 @@
945945
## Remarks
946946
947947
<xref:System.Threading.CancellationTokenSource.TryReset> is intended to be used by the sole owner of the <xref:System.Threading.CancellationTokenSource>
948-
when it is known that:
948+
when it is known that:
949949
950950
- The operation with which the <xref:System.Threading.CancellationTokenSource> was used has completed.
951951
- No-one else will attempt to cancel it.
952-
953952
- Any remaining registrations are erroneous.
954953
955-
Upon a successful reset, such registrations will no longer be notified for any subsequent cancellation of the
956-
<xref:System.Threading.CancellationTokenSource>; however, if any component still holds a reference to this
957-
<xref:System.Threading.CancellationTokenSource> either directly or indirectly via a <xref:System.Threading.CancellationToken>
958-
handed out from it, polling via their reference will show the current state any time after the reset as
959-
it's the same instance. Usage of <xref:System.Threading.CancellationTokenSource.TryReset> concurrently with requesting cancellation is not
960-
thread-safe and may result in <xref:System.Threading.CancellationTokenSource.TryReset> returning `true` even if cancellation was already requested. Also, it may result
961-
in registrations not being invoked as part of the concurrent cancellation request.
954+
Upon a successful reset, such registrations will no longer be notified for any subsequent cancellation of the
955+
<xref:System.Threading.CancellationTokenSource>; however, if any component still holds a reference to this
956+
<xref:System.Threading.CancellationTokenSource> either directly or indirectly via a <xref:System.Threading.CancellationToken>
957+
handed out from it, polling via their reference will show the current state any time after the reset as
958+
it's the same instance. Usage of <xref:System.Threading.CancellationTokenSource.TryReset> concurrently with requesting cancellation is not
959+
thread-safe and may result in <xref:System.Threading.CancellationTokenSource.TryReset> returning `true` even if cancellation was already requested. Also, it may result
960+
in registrations not being invoked as part of the concurrent cancellation request.
962961
963962
]]></format>
964963
</remarks>

0 commit comments

Comments
 (0)