DispatcherExtensions.RunSync

Allows running an Async Operation synchronously by waiting for a result.

public static void RunSync(Dispatcher disp,
	Func<Task> del)

Parameters

disp

del
async lambda

Remarks

Use with caution and only as a last resort.

Can still deadlock, but much less likely than plain GetResult()

CAN DEADLOCK ON SHUTDOWN IF STILL RUNNING IN FRAME


See also:

Class DispatcherExtensions

© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic