QueueUserWorkItem()

ThreadPool::QueueUserWorkItem(WaitCallback) method

Puts work item into queue which is present with callback with no parameter.

static bool System::Threading::ThreadPool::QueueUserWorkItem(WaitCallback callback)

Arguments

ParameterTypeDescription
callbackWaitCallbackCallback function to be used as a job.

Return Value

Always returns true.

ThreadPool::QueueUserWorkItem(WaitCallback, const System::SharedPtr<System::Object>&) method

Puts work item into queue which is present with callback with no parameter.

static bool System::Threading::ThreadPool::QueueUserWorkItem(WaitCallback callback, const System::SharedPtr<System::Object> &state)

Arguments

ParameterTypeDescription
callbackWaitCallbackCallback function to be used as a job.
stateconst System::SharedPtr<System::Object>&Job function parameter.

Return Value

Always returns true.

See Also