SPSafeThread.Execute Method
This method is a is used with background threads to manage unhandled exceptions and prevent the process from becoming unresponsive or locked.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Sub Execute ( _
codeToRun As SPSafeThread.CodeToRun _
)
'Usage
Dim codeToRun As SPSafeThread.CodeToRunSPSafeThread.Execute(codeToRun)
public static void Execute(
SPSafeThread.CodeToRun codeToRun
)
Parameters
codeToRun
Type: Microsoft.SharePoint.Utilities.SPSafeThread.CodeToRunCode to wrap in the thread-safe environment and run.