|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Leaf.Parallel
{
public interface IParallelStrategy
{
/// <summary>
/// Execute a code block asynchronously
/// </summary>
/// <typeparam name="T">Result type of the code block</typeparam>
/// <param name="asyncRoutine">The code block to execute</param>
/// <param name="callbackRoutine">The callback routine</param>
/// <param name="exceptionRoutine">The Exception Routine</param>
/// <param name="callbackMode"></param>
/// <returns>Holder of the result for the code block</returns>
NResult<T> Execute<T>(Func<T> asyncRoutine, NResultDel<T> callbackRoutine, NExceptionDel exceptionRoutine, CallbackMode callbackMode);
NResult<NVoid> Execute(NVoidCallDel asyncRoutine, NVoidCallDel callbackRoutine, NExceptionDel exceptionRoutine, CallbackMode callbackMode);
/// <summary>
/// The overall exception handling routine,
/// will be used when no exception routine is provided for the function
/// </summary>
NExceptionDel ExceptionDel { get; set; }
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Leaf is a software developer based in ShangHai China.
My major programming languages are C#/C++.
I am very interested in distributed system design and rich client development.
Current I am working on
NParallel.