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)

public:
property Task^ Completion {
	Task^ get();
}

Property Value

Type: System.Threading.Tasks::Task^

Returns Task.

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.

Return to top
Show: