|
945 | 945 | ## Remarks |
946 | 946 |
|
947 | 947 | <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: |
949 | 949 |
|
950 | 950 | - The operation with which the <xref:System.Threading.CancellationTokenSource> was used has completed. |
951 | 951 | - No-one else will attempt to cancel it. |
952 | | -
|
953 | 952 | - Any remaining registrations are erroneous. |
954 | 953 |
|
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. |
962 | 961 |
|
963 | 962 | ]]></format> |
964 | 963 | </remarks> |
|
0 commit comments