JoinableTaskCollection Class

Definition

A collection of incomplete JoinableTask objects.

C++
public ref class JoinableTaskCollection : System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Threading::JoinableTask ^>
Inheritance
JoinableTaskCollection
Attributes
Implements

Remarks

Any completed JoinableTask is automatically removed from the collection.

Constructors

Properties

Context

Gets the JoinableTaskContext to which this collection belongs.

DisplayName

Gets or sets a human-readable name that may appear in hang reports.

Methods

Add(JoinableTask)

Adds the specified JoinableTask to this collection.

Contains(JoinableTask)

Checks whether the specified joinable task is a member of this collection.

GetEnumerator()

Enumerates the tasks in this collection.

Join()

Shares access to the main thread that the caller's JoinableTask may have (if any) with all JoinableTask instances in this collection until the returned value is disposed.

JoinTillEmptyAsync()

Joins the caller's context to this collection till the collection is empty.

JoinTillEmptyAsync(CancellationToken)

Joins the caller's context to this collection till the collection is empty.

Remove(JoinableTask)

Removes the specified JoinableTask from this collection, or decrements the ref count if this collection tracks that.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Enumerates the tasks in this collection.

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to

Produkt Verzie
Visual Studio SDK 2015, 2017, 2019, 2022

Thread Safety

This type is thread-safe for all members.