I have a question about invokeAsync, and let the cal order be taken as reliable ornot.
Example:
private Dispatcher _dsp = Dispatcher.CurrentDispatcher;
private void a() {
b();
_dsp.InvokeAsync(() => {
});
}
private void b() {
_dsp.InvokeAsync(() => {
});
}
Can it be taken for granted that the code in b InvokeAsync will run before the code in "InvokeAsync", since it is first placed in the UI message flow manager, or is this the case when most of the time b will be run first, but on odd circulations, can to be, on the contrary, or, even worse, to jump between them?
Basically, maybe I will have problems with these 2 calls at some point or is this normal and will reliably follow the execution order that I mentioned? If there is a chance of a problem, any ideas on how to do this well?