A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.-ctor below:

CancellationTokenSource Constructor (System.Threading) | Microsoft Learn

CancellationTokenSource Constructors Definition Overloads CancellationTokenSource() CancellationTokenSource(Int32)
Source:
CancellationTokenSource.cs
Source:
CancellationTokenSource.cs
Source:
CancellationTokenSource.cs
Source:
CancellationTokenSource.cs

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.

Remarks

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.

CancellationTokenSource(TimeSpan) CancellationTokenSource(TimeSpan, TimeProvider)
Source:
CancellationTokenSource.cs
Source:
CancellationTokenSource.cs
Source:
CancellationTokenSource.cs
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 article

Was 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