The Microsoft.VisualStudio.Threading is a xplat library that provides many threading and synchronization primitives used in Visual Studio and other applications.
TaskSchedulerto switch to it. Switch to a background thread with
Taskwith a timeout
JoinableTaskFactorythat allows you to schedule asynchronous or synchronous work that does not deadlock with the UI thread even when the UI thread needs to synchronously block on the result.