ThreadPoolThrottle.QueueUserWorkItem Method

Queue a work item to the thread pool while obeying the thread limit passed in the constructor. If this instance of the [ThreadPoolThrottle] already has submitted its limit of simultaneous tasks to the thread pool, queue this work item and return.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Function QueueUserWorkItem ( _
    callBack As WaitCallback, _
    state As Object _
) As Boolean
public bool QueueUserWorkItem(
    WaitCallback callBack,
    Object state
)
public:
bool QueueUserWorkItem(
    WaitCallback^ callBack, 
    Object^ state
)
member QueueUserWorkItem : 
        callBack:WaitCallback * 
        state:Object -> bool
public function QueueUserWorkItem(
    callBack : WaitCallback, 
    state : Object
) : boolean

Parameters

  • state
    Type: System.Object

    A state object to be supplied on the callback.

Return Value

Type: System.Boolean
[True] if the request was successfully queued and [false] if not.

.NET Framework Security

See Also

Reference

ThreadPoolThrottle Class

Microsoft.TeamFoundation.Framework.Server Namespace