JoinableTaskContext.IsWithinJoinableTask Property
Determines whether the caller is currently running in the context of a joinable task.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public ReadOnly Property IsWithinJoinableTask As Boolean
public bool IsWithinJoinableTask { get; }
public:
property bool IsWithinJoinableTask {
bool get ();
}
member IsWithinJoinableTask : bool with get
function get IsWithinJoinableTask () : boolean
Property Value
Type: System.Boolean
true if the caller is currently running in the context of a joinable task, otherwise false.
Remarks
Use of this property is generally discouraged, because any operation that becomes a no-op when no ambient JoinableTask is present is very cheap. For clients that have complex algorithms that are relevant only if an ambient joinable task is present, this property may serve to skip that for performance reasons.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.