AsyncQueue<T>::Completion Property
Visual Studio 2015
The source of the task returned by Completion. This is lazily constructed.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
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.
Show: