Evolution/Evolution/Core/MultithreadedCachedExecutor.cs
/// <summary>
/// Adds a list of tasks to queue and waits until completion
/// </summary>
/// <typeparam name="I">Input value</typeparam>
/// <typeparam name="O">Return value</typeparam>
/// <param name="action">The action.</param>
/// <param name="input">The input.</param>
/// <returns></returns>
Adds a list of tasks to queue and waits until completion
Adds a list of tasks to queue and waits until completion
public List<O> AddToQueueAndWait<I, O>(Func<I, O> action, IEnumerable<I> input)
        {
            if (UseMultithreading)
            {
                ParallelResult<I, O> parallelResult = new ParallelResult<I, O>(input, action);
                return parallelResult.Run();
            }
            else
            {
                return input.Select(action).ToList();
            }
        }
public List < O > AddToQueueAndWait < I , O > ( Func < I , O > action , IEnumerable < I > input ) { if ( UseMultithreading ) { ParallelResult < I , O > parallelResult = new ParallelResult < I , O > ( input , action ) ; return parallelResult . Run ( ) ; } else { return input . Select ( action ) . ToList ( ) ; } }
Adds a list of tasks to queue and waits until completion
Adds a list of tasks to queue and waits until completion
None
action
Func<I, O>
None
input
IEnumerable<I>
None
typeparam
None
typeparam
None