ThreadPoolThrottle.QueueUserWorkItemWithWait Method
Queue a work item to the threadpool 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 threadpool, wait for an existing work item to complete and submit this request when there is room.
Namespace: Microsoft.TeamFoundation.Server.Core
Assembly: Microsoft.TeamFoundation.Server.Core (in Microsoft.TeamFoundation.Server.Core.dll)
Syntax
'Declaration
Public Function QueueUserWorkItemWithWait ( _
callBack As WaitCallback, _
state As Object _
) As Boolean
public bool QueueUserWorkItemWithWait(
WaitCallback callBack,
Object state
)
public:
bool QueueUserWorkItemWithWait(
WaitCallback^ callBack,
Object^ state
)
member QueueUserWorkItemWithWait :
callBack:WaitCallback *
state:Object -> bool
public function QueueUserWorkItemWithWait(
callBack : WaitCallback,
state : Object
) : boolean
Parameters
callBack
Type: System.Threading.WaitCallbackThe callback to be called on the threadpool thread.
state
Type: System.ObjectA 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.