Decide when to use ConfigureAwait (false)

If the instructions in the call graph after the β€œwait” point do not have access to an object whose type is not derived from the System.Windows.UIElement class, can we say that the developer uses ConfigureAwait (false) for Windows Mobile applications safely?

What instructions should have been executed in the user interface thread other than updating GUI elements?

+8
c # async-await
source share
1 answer

Any code that directly (or indirectly) manipulates user interface elements must be run in the context of the user interface. This usually involves direct manipulation and updating of ViewModels.

In all other situations, you should use ConfigureAwait(false) .

+9
source share

All Articles