Share via


Support.ProcessIdleTasks Method

Applies To: Windows 8.1

Requests the system run the maintenance tasks scheduled to run when the system is idle. This prevents the maintenance tasks from running during the assessment.

Namespace: Microsoft.Assessments.Runtime
Assembly: Microsoft.Assessments.Core (in Microsoft.Assessments.Core.dll)

Usage

'Usage
Dim instance As Support
Dim returnValue As WaitHandle

returnValue = instance.ProcessIdleTasks

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", Justification:="There is nothing that can be done if CloseHandle fails.")> _
Public Function ProcessIdleTasks As WaitHandle
[SuppressMessageAttribute("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", Justification="There is nothing that can be done if CloseHandle fails.")] 
public WaitHandle ProcessIdleTasks ()
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1806:DoNotIgnoreMethodResults", Justification=L"There is nothing that can be done if CloseHandle fails.")] 
public:
WaitHandle^ ProcessIdleTasks ()
/** @attribute SuppressMessageAttribute("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", Justification="There is nothing that can be done if CloseHandle fails.") */ 
public WaitHandle ProcessIdleTasks ()
SuppressMessageAttribute("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", Justification="There is nothing that can be done if CloseHandle fails.") 
public function ProcessIdleTasks () : WaitHandle

Return Value

Returns WaitHandle.

Remarks

This method enables an assessment to request that the operating system to perform maintenance tasks usually run when the system is idle. Maintenance tasks such as disk defragmentation can take an extremely long time to complete, and running them beforehand is less likely to interfere with the assessment.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows 8.1

See Also

Reference

Support Class
Support Members
Microsoft.Assessments.Runtime Namespace