SocketTools .NET Edition

HttpClient.TaskSuspend Method (Int32)

Suspend execution of an asynchronous task.

[Visual Basic]
Overloads Public Function TaskSuspend( _
   ByVal taskId As Integer _
) As Boolean
[C#]
public bool TaskSuspend(
   int taskId
);

Parameters

taskId
An integer value that specifies the unique identifier associated with a background task.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The TaskSuspend method will suspend execution of the background worker thread associated with the task.

Once the task has been suspended, it will no longer be scheduled for execution, however the client session will remain active and the task may be resumed using the TaskResume method. Note that if a task is suspended for a long period of time, the background operation may fail because it has exceeded the timeout period imposed by the server.

See Also

HttpClient Class | SocketTools Namespace | HttpClient.TaskSuspend Overload List