ParallelHelperEndFor Method

Waits for the pending asynchronous operation started by one of the BeginFor methods to complete. In .NET Framework 4.0 and above you can use the ForAsync methods instead.

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static bool EndFor(
	IAsyncResult asyncResult
)

Parameters

asyncResult  IAsyncResult
The reference to the pending asynchronous request to finish.

Return Value

Boolean
, if the operation completed successfully.
, if the operation has been canceled and ThrowIfCanceled in the asyncConfig parameter was set to .

Exceptions

ArgumentNullExceptionasyncResult is .
InvalidOperationExceptionasyncResult was not returned by a BeginFor overload or this method was called with the same instance multiple times.
OperationCanceledExceptionThe operation has been canceled and ThrowIfCanceled in the asyncConfig parameter was .

See Also