Table of Contents

For Method

For<TResult>(int, int, int, int, Func<int, Task<TResult>>)

public static Fibers<int, TResult> For<TResult>(int concurrency, int start, int end, int step, Func<int, Task<TResult>> factory)

Creates a new Fibers<TSource, TValue> instance for processing a range of integers.

Parameters

concurrency int

The maximum number of concurrent tasks.

start int

The starting value of the integer range (inclusive).

end int

The ending value of the integer range (exclusive).

step int

The step increment for the integer range.

factory Func<int, Task<TResult>>

A function that takes an integer and returns a Task<TResult>.

Returns

Fibers<int, TResult>

A new Fibers<TSource, TValue> instance.

Type Parameters

TResult

The type of the result produced by the factory function.