Share via


VsTaskLibraryHelper.StartOnIdle Method

Definition

Overloads

StartOnIdle(JoinableTaskFactory, Action, VsTaskRunContext)

Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller.

StartOnIdle(JoinableTaskFactory, Func<Task>, VsTaskRunContext)

Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller.

StartOnIdle(JoinableTaskFactory, Action, VsTaskRunContext)

Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller.

public static Microsoft.VisualStudio.Threading.JoinableTask StartOnIdle (this Microsoft.VisualStudio.Threading.JoinableTaskFactory joinableTaskFactory, Action action, Microsoft.VisualStudio.Shell.VsTaskRunContext priority = Microsoft.VisualStudio.Shell.VsTaskRunContext.UIThreadBackgroundPriority);
static member StartOnIdle : Microsoft.VisualStudio.Threading.JoinableTaskFactory * Action * Microsoft.VisualStudio.Shell.VsTaskRunContext -> Microsoft.VisualStudio.Threading.JoinableTask
<Extension()>
Public Function StartOnIdle (joinableTaskFactory As JoinableTaskFactory, action As Action, Optional priority As VsTaskRunContext = Microsoft.VisualStudio.Shell.VsTaskRunContext.UIThreadBackgroundPriority) As JoinableTask

Parameters

joinableTaskFactory
JoinableTaskFactory

The factory to use for creating the task.

action
Action

The delegate to invoke on the UI thread sometime in the future.

priority
VsTaskRunContext

The priority to use when switching to the UI thread or resuming after a yielding await.

Returns

The JoinableTask that represents the on-idle operation.

Applies to

StartOnIdle(JoinableTaskFactory, Func<Task>, VsTaskRunContext)

Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller.

public static Microsoft.VisualStudio.Threading.JoinableTask StartOnIdle (this Microsoft.VisualStudio.Threading.JoinableTaskFactory joinableTaskFactory, Func<System.Threading.Tasks.Task> asyncMethod, Microsoft.VisualStudio.Shell.VsTaskRunContext priority = Microsoft.VisualStudio.Shell.VsTaskRunContext.UIThreadBackgroundPriority);
static member StartOnIdle : Microsoft.VisualStudio.Threading.JoinableTaskFactory * Func<System.Threading.Tasks.Task> * Microsoft.VisualStudio.Shell.VsTaskRunContext -> Microsoft.VisualStudio.Threading.JoinableTask
<Extension()>
Public Function StartOnIdle (joinableTaskFactory As JoinableTaskFactory, asyncMethod As Func(Of Task), Optional priority As VsTaskRunContext = Microsoft.VisualStudio.Shell.VsTaskRunContext.UIThreadBackgroundPriority) As JoinableTask

Parameters

joinableTaskFactory
JoinableTaskFactory

The factory to use for creating the task.

asyncMethod
Func<Task>

The async delegate to invoke on the UI thread sometime in the future.

priority
VsTaskRunContext

The priority to use when switching to the UI thread or resuming after a yielding await.

Returns

The JoinableTask that represents the on-idle operation.

Applies to