AsyncQueue<T>.Completion Property

The source of the task returned by Completion. This is lazily constructed.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Public ReadOnly Property Completion As Task
public Task Completion { get; }
public:
property Task^ Completion {
    Task^ get ();
}
member Completion : Task with get
function get Completion () : Task

Property Value

Type: System.Threading.Tasks.Task
Returns Task.

Remarks

This property is volatile in order to prevent the CPU from reordering commands around the assignment (or read) of this field. This allows the check-lock-check pattern in this property to be reliable when one thread within the lock initializes the value and assigns the field, and the weak memory model allows it to be assigned before it is initialized. Another thread outside the lock might observe the non-null field and start accessing the Task property before it is actually initialized.

.NET Framework Security

See Also

Reference

AsyncQueue<T> Class

Microsoft.VisualStudio.Threading Namespace