Initializes a new instance of the CancellationTokenSource class that will be canceled after the specified delay in milliseconds.
public:
CancellationTokenSource(int millisecondsDelay);
public CancellationTokenSource(int millisecondsDelay);
new System.Threading.CancellationTokenSource : int -> System.Threading.CancellationTokenSource
Public Sub New (millisecondsDelay As Integer)
Parameters Exceptions
millisecondsDelay
is less than -1.
The countdown for the millisecondsDelay
starts during the call to the constructor. When the millisecondsDelay
expires, the constructed CancellationTokenSource is canceled (if it has not been canceled already).
Subsequent calls to CancelAfter will reset the millisecondsDelay
for the constructed CancellationTokenSource, if it has not been canceled already.
public:
CancellationTokenSource(TimeSpan delay, TimeProvider ^ timeProvider);
public CancellationTokenSource(TimeSpan delay, TimeProvider timeProvider);
new System.Threading.CancellationTokenSource : TimeSpan * TimeProvider -> System.Threading.CancellationTokenSource
Public Sub New (delay As TimeSpan, timeProvider As TimeProvider)
Parameters Exceptions Remarks
The countdown for the delay starts during the call to the constructor. When the delay expires, the constructed CancellationTokenSource is canceled, if it has not been canceled already. Subsequent calls to CancelAfter will reset the delay for the constructed CancellationTokenSource, if it has not been canceled already.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4