TaskResultBase

Description

abstract class Tinman.Core.Threading.Pooling.TaskResultBase

Derived from

IMemoryConsumption

Extended by

TaskResult abstract
TaskResultVoid abstract

Abstract base class for all classes that represent the result of a pending task execution.

Public / Methods

Wait


[ThreadSafe]
public method Wait → (1)

timeout opt : int32 = 0

[>=0]
The timeout in milliseconds. If 0, the method immediately returns.

returns → bool

true if the task has finished, false if it is still pending.

Waits for the task to finish.

For properly ending a task, the Finish method (see below) must be called. The task result object and exception information can be obtained then. When Wait returns true, calling the Finish method will not block; it will otherwise.

Public / Attributes

Exception


public attribute Exception → (get)

value : TinmanError

The error information object or null if the task has finished without errors.

Error information about the exception that has occurred during the task execution.

Has​Finished


public attribute HasFinished → (get)

value : bool

true if the task has finished, false if it is still pending.

Has the task finished?

If this property returns true, the Finish method will not block when called.

Time​Perform


public attribute TimePerform → (get)

value : float32

[>=0]
The time span, in seconds.

Time span of actual task execution.

Time​Schedule


public attribute TimeSchedule → (get)

value : float32

[>=0]
The time span, in seconds.

Time span between scheduling and finishing.

Protected / Constants

Error​Cancel


protected static readonly attribute ErrorCancel → (TinmanError)

Special TinmanError object that is used when a task has been cancelled by the user.

Protected / Attributes

exception


protected attribute exception → (TinmanError)

Error information about the exception that has occurred during the task execution.