ParallelHelperEndSort Method

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

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static bool EndSort(
	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 BeginSort overload or this method was called with the same instance multiple times.
OperationCanceledExceptionThe operation has been canceled and ThrowIfCanceled in the asyncConfig parameter was .
ArgumentExceptionThe IComparerT returned inconsistent results.
InvalidOperationException The IComparerT instance was , and an element does not implement the IComparableT interface.

See Also