C# Class GitHub.Helpers.ThreadingHelper

Mostrar archivo Open project: github/VisualStudio

Public Methods

Method Description
SwitchToMainThreadAsync ( ) : IAwaitable

Switch to the UI thread using ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync Auto-disables switching when running in unit test mode

SwitchToPoolThreadAsync ( TaskScheduler scheduler ) : IAwaitable

Switch to a thread pool background thread if the current thread isn't one, otherwise does nothing Auto-disables switching when running in unit test mode

Method Details

SwitchToMainThreadAsync() public static method

Switch to the UI thread using ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync Auto-disables switching when running in unit test mode
public static SwitchToMainThreadAsync ( ) : IAwaitable
return IAwaitable

SwitchToPoolThreadAsync() public static method

Switch to a thread pool background thread if the current thread isn't one, otherwise does nothing Auto-disables switching when running in unit test mode
public static SwitchToPoolThreadAsync ( TaskScheduler scheduler ) : IAwaitable
scheduler System.Threading.Tasks.TaskScheduler
return IAwaitable