IJobSchedulerContextYieldResource Method (String, Int64, Boolean) |
Yields the resource with the specified amount.
Namespace:
AGI.Parallel.Infrastructure
Assembly:
AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 2.9.0.1601 (2.9.0.1601)
Syntax long YieldResource(
string resource,
long amount,
bool restrictToChildren
)
Function YieldResource (
resource As String,
amount As Long,
restrictToChildren As Boolean
) As Long
Parameters
- resource
- Type: SystemString
The resource. You can find common values for resources using ConsumableResources. - amount
- Type: SystemInt64
The amount. - restrictToChildren
- Type: SystemBoolean
if set to true will yield resources only to child jobs.
Return Value
Type:
Int64The resource amount currently consumed by the task.
Exceptions Exception | Condition |
---|
ArgumentNullException | If resource is null. |
ArgumentOutOfRangeException | If amount if less than 0. |
JobSchedulerException | If error occurred during operation. For instance, yield amount was more than the amount current allocated. |
See Also