次の方法で共有


JoinableTaskContext.IsWithinJoinableTask Property

Definition

Gets a value indicating whether the caller is currently running within the context of a joinable task.

public:
 property bool IsWithinJoinableTask { bool get(); };
public:
 property bool IsWithinJoinableTask { bool get(); };
public bool IsWithinJoinableTask { get; }
member this.IsWithinJoinableTask : bool
Public ReadOnly Property IsWithinJoinableTask As Boolean

Property Value

true if the caller is currently running in the context of a joinable task, otherwise false.

Remarks

Use of this property is generally discouraged, as any operation that becomes a no-op when no ambient JoinableTask is present is very cheap. For clients that have complex algorithms that are only relevant if an ambient joinable task is present, this property may serve to skip that for performance reasons.

Applies to