Share via


SPThreadPool.QueueUserWorkItemWithUserToken method

Queues a method for execution by using the specified user token.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function QueueUserWorkItemWithUserToken ( _
    callback As WaitCallback, _
    state As Object, _
    token As SPUserToken _
) As Boolean
'Usage
Dim callback As WaitCallback
Dim state As Object
Dim token As SPUserToken
Dim returnValue As Boolean

returnValue = SPThreadPool.QueueUserWorkItemWithUserToken(callback, _
    state, token)
public static bool QueueUserWorkItemWithUserToken(
    WaitCallback callback,
    Object state,
    SPUserToken token
)

Parameters

  • state
    Type: System.Object

    An object that contains data to be used by the method.

Return value

Type: System.Boolean
true if the method is successfully queued; otherwise, false.

See also

Reference

SPThreadPool class

SPThreadPool members

Microsoft.SharePoint.Utilities namespace