Click or drag to resize

IJobSchedulerContextReserveResource Method (String, Int64, Int32)

Reserves the resource with the specified amount, with the specified time-out.

Namespace:  AGI.Parallel.Infrastructure
Assembly:  AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 2.9.0.1601 (2.9.0.1601)
Syntax
long ReserveResource(
	string resource,
	long amount,
	int millisecondsTimeout
)

Parameters

resource
Type: SystemString
The resource. You can find common values for resources using ConsumableResources.
amount
Type: SystemInt64
The amount.
millisecondsTimeout
Type: SystemInt32
The number of milliseconds to wait, or System.Threading.Timeout.Infinite (-1) to wait indefinitely.

Return Value

Type: Int64
The resource amount currently consumed by the task.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf resource is null.
ArgumentOutOfRangeExceptionIf amount if less than 0.
JobSchedulerExceptionIf error occurred during operation. For instance, there were not enough resources to satisfy reserve request.
Remarks
Blocks until the resource becomes available or the time-out expires. If the time-out expires a JobSchedulerException is thrown.
See Also

STK Parallel Computing Server 2.9 API for .NET