J
Jeff Newman
Does anyone know if the order of delegate calls onto a thread through
BeginInvoke are guaranteed to come in the same order that they are
placed? For example, if the following calls happen in order:
control.BeginInvoke(new InvokeDelegate(functionOne));
control.BeginInvoke(new InvokeDelegate(functionTwo));
Is there now a guarantee that functionOne will be executed before
function two on the thread that created control? Does this hold if
the code above happens to be executing on the same thread that is
being invoked upon (ie control.InvokeRequired == false)?
This seems like an obvious question to me (that the order would be
preserved), but we're seeing some behavior that appears to indicate
otherwise and I'm trying to cover our bases.
Thanks!
BeginInvoke are guaranteed to come in the same order that they are
placed? For example, if the following calls happen in order:
control.BeginInvoke(new InvokeDelegate(functionOne));
control.BeginInvoke(new InvokeDelegate(functionTwo));
Is there now a guarantee that functionOne will be executed before
function two on the thread that created control? Does this hold if
the code above happens to be executing on the same thread that is
being invoked upon (ie control.InvokeRequired == false)?
This seems like an obvious question to me (that the order would be
preserved), but we're seeing some behavior that appears to indicate
otherwise and I'm trying to cover our bases.
Thanks!