diff --git a/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder.cs b/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder.cs
index ffd9076..dd70024 100644
--- a/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder.cs
+++ b/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder.cs
@@ -62,6 +62,17 @@ public IAsyncProcessor ProcessOneAtATime()
{
return new OneAtATimeAsyncProcessor(_count, _taskSelector, _cancellationTokenSource).StartProcessing();
}
+
+ ///
+ /// Process ALL tasks in parallel without any concurrency limits.
+ /// WARNING: Use with caution - can overwhelm system resources with large task counts.
+ /// Ideal for scenarios requiring maximum parallelism like running thousands of unit tests.
+ ///
+ /// An async processor with unbounded parallelism.
+ public IAsyncProcessor ProcessInParallelUnbounded()
+ {
+ return new UnboundedParallelAsyncProcessor(_count, _taskSelector, _cancellationTokenSource).StartProcessing();
+ }
#if NET6_0_OR_GREATER
///
diff --git a/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder_1.cs b/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder_1.cs
index 3e1861a..d66fb9f 100644
--- a/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder_1.cs
+++ b/EnumerableAsyncProcessor/Builders/ActionAsyncProcessorBuilder_1.cs
@@ -62,6 +62,17 @@ public IAsyncProcessor ProcessOneAtATime()
{
return new ResultOneAtATimeAsyncProcessor(_count, _taskSelector, _cancellationTokenSource).StartProcessing();
}
+
+ ///
+ /// Process ALL tasks in parallel without any concurrency limits and return results.
+ /// WARNING: Use with caution - can overwhelm system resources with large task counts.
+ /// Ideal for scenarios requiring maximum parallelism like running thousands of unit tests.
+ ///
+ /// An async processor with unbounded parallelism that returns results.
+ public IAsyncProcessor ProcessInParallelUnbounded()
+ {
+ return new ResultUnboundedParallelAsyncProcessor(_count, _taskSelector, _cancellationTokenSource).StartProcessing();
+ }
#if NET6_0_OR_GREATER
///
diff --git a/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_1.cs b/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_1.cs
index 781233e..867eb33 100644
--- a/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_1.cs
+++ b/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_1.cs
@@ -69,6 +69,18 @@ public IAsyncProcessor ProcessOneAtATime()
return new OneAtATimeAsyncProcessor(_items, _taskSelector, _cancellationTokenSource)
.StartProcessing();
}
+
+ ///
+ /// Process ALL items in parallel without any concurrency limits.
+ /// WARNING: Use with caution - can overwhelm system resources with large item counts.
+ /// Ideal for scenarios requiring maximum parallelism like running thousands of unit tests.
+ ///
+ /// An async processor with unbounded parallelism.
+ public IAsyncProcessor ProcessInParallelUnbounded()
+ {
+ return new UnboundedParallelAsyncProcessor(_items, _taskSelector, _cancellationTokenSource)
+ .StartProcessing();
+ }
#if NET6_0_OR_GREATER
///
diff --git a/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_2.cs b/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_2.cs
index 84af000..e25b510 100644
--- a/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_2.cs
+++ b/EnumerableAsyncProcessor/Builders/ItemActionAsyncProcessorBuilder_2.cs
@@ -62,6 +62,17 @@ public IAsyncProcessor ProcessOneAtATime()
{
return new ResultOneAtATimeAsyncProcessor(_items, _taskSelector, _cancellationTokenSource).StartProcessing();
}
+
+ ///
+ /// Process ALL items in parallel without any concurrency limits and return results.
+ /// WARNING: Use with caution - can overwhelm system resources with large item counts.
+ /// Ideal for scenarios requiring maximum parallelism like running thousands of unit tests.
+ ///
+ /// An async processor with unbounded parallelism that returns results.
+ public IAsyncProcessor ProcessInParallelUnbounded()
+ {
+ return new ResultUnboundedParallelAsyncProcessor(_items, _taskSelector, _cancellationTokenSource).StartProcessing();
+ }
#if NET6_0_OR_GREATER
///
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor.cs b/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor.cs
index cc911cd..512ade6 100644
--- a/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor.cs
+++ b/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor.cs
@@ -13,8 +13,9 @@ public class IOBoundParallelAsyncProcessor : AbstractAsyncProcessor
internal IOBoundParallelAsyncProcessor(int count, Func taskSelector, CancellationTokenSource cancellationTokenSource, int? maxConcurrency = null) : base(count, taskSelector, cancellationTokenSource)
{
- // For I/O operations, allow much higher concurrency - default to 10x processor count or minimum 100
- _maxConcurrency = maxConcurrency ?? Math.Max(100, Environment.ProcessorCount * 10);
+ // For I/O operations, allow much higher concurrency - default to 64x processor count or minimum 1000
+ // This enables scenarios like running 10,000 unit tests in parallel
+ _maxConcurrency = maxConcurrency ?? Math.Max(1000, Environment.ProcessorCount * 64);
}
internal override async Task Process()
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor_1.cs b/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor_1.cs
index f359ee8..dcf9735 100644
--- a/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor_1.cs
+++ b/EnumerableAsyncProcessor/RunnableProcessors/IOBoundParallelAsyncProcessor_1.cs
@@ -13,8 +13,9 @@ public class IOBoundParallelAsyncProcessor : AbstractAsyncProcessor items, Func taskSelector, CancellationTokenSource cancellationTokenSource, int? maxConcurrency = null) : base(items, taskSelector, cancellationTokenSource)
{
- // For I/O operations, allow much higher concurrency - default to 10x processor count or minimum 100
- _maxConcurrency = maxConcurrency ?? Math.Max(100, Environment.ProcessorCount * 10);
+ // For I/O operations, allow much higher concurrency - default to 64x processor count or minimum 1000
+ // This enables scenarios like running 10,000 unit tests in parallel
+ _maxConcurrency = maxConcurrency ?? Math.Max(1000, Environment.ProcessorCount * 64);
}
internal override async Task Process()
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_1.cs b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_1.cs
index 3b0f2a5..8fae933 100644
--- a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_1.cs
+++ b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_1.cs
@@ -13,8 +13,9 @@ public class ResultIOBoundParallelAsyncProcessor : ResultAbstractAsyncP
internal ResultIOBoundParallelAsyncProcessor(int count, Func> taskSelector, CancellationTokenSource cancellationTokenSource, int? maxConcurrency = null) : base(count, taskSelector, cancellationTokenSource)
{
- // For I/O operations, allow much higher concurrency - default to 10x processor count or minimum 100
- _maxConcurrency = maxConcurrency ?? Math.Max(100, Environment.ProcessorCount * 10);
+ // For I/O operations, allow much higher concurrency - default to 64x processor count or minimum 1000
+ // This enables scenarios like running 10,000 unit tests in parallel
+ _maxConcurrency = maxConcurrency ?? Math.Max(1000, Environment.ProcessorCount * 64);
}
internal override async Task Process()
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_2.cs b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_2.cs
index ebbed16..6bd696f 100644
--- a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_2.cs
+++ b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultIOBoundParallelAsyncProcessor_2.cs
@@ -13,8 +13,9 @@ public class ResultIOBoundParallelAsyncProcessor : ResultAbstra
internal ResultIOBoundParallelAsyncProcessor(IEnumerable items, Func> taskSelector, CancellationTokenSource cancellationTokenSource, int? maxConcurrency = null) : base(items, taskSelector, cancellationTokenSource)
{
- // For I/O operations, allow much higher concurrency - default to 10x processor count or minimum 100
- _maxConcurrency = maxConcurrency ?? Math.Max(100, Environment.ProcessorCount * 10);
+ // For I/O operations, allow much higher concurrency - default to 64x processor count or minimum 1000
+ // This enables scenarios like running 10,000 unit tests in parallel
+ _maxConcurrency = maxConcurrency ?? Math.Max(1000, Environment.ProcessorCount * 64);
}
internal override async Task Process()
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_1.cs b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_1.cs
new file mode 100644
index 0000000..8ecda1b
--- /dev/null
+++ b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_1.cs
@@ -0,0 +1,33 @@
+using EnumerableAsyncProcessor.RunnableProcessors.ResultProcessors.Abstract;
+
+namespace EnumerableAsyncProcessor.RunnableProcessors.ResultProcessors;
+
+///
+/// A specialized parallel processor that starts ALL tasks immediately without any concurrency limits and returns results.
+/// WARNING: Use with caution - this can overwhelm system resources with large task counts.
+/// Ideal for scenarios where you need maximum parallelism and have sufficient resources.
+///
+public class ResultUnboundedParallelAsyncProcessor : ResultAbstractAsyncProcessor
+{
+ internal ResultUnboundedParallelAsyncProcessor(int count, Func> taskSelector, CancellationTokenSource cancellationTokenSource) : base(count, taskSelector, cancellationTokenSource)
+ {
+ }
+
+ internal override Task Process()
+ {
+ // Start ALL tasks immediately without any throttling
+ // This provides true unbounded parallelism
+ var tasks = TaskWrappers.Select(taskWrapper =>
+ {
+ var task = taskWrapper.Process(CancellationToken);
+ // Fast-path for already completed tasks
+ if (task.IsCompleted)
+ {
+ return task;
+ }
+ return task;
+ });
+
+ return Task.WhenAll(tasks);
+ }
+}
\ No newline at end of file
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_2.cs b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_2.cs
new file mode 100644
index 0000000..03608aa
--- /dev/null
+++ b/EnumerableAsyncProcessor/RunnableProcessors/ResultProcessors/ResultUnboundedParallelAsyncProcessor_2.cs
@@ -0,0 +1,33 @@
+using EnumerableAsyncProcessor.RunnableProcessors.ResultProcessors.Abstract;
+
+namespace EnumerableAsyncProcessor.RunnableProcessors.ResultProcessors;
+
+///
+/// A specialized parallel processor that starts ALL tasks immediately without any concurrency limits and returns results.
+/// WARNING: Use with caution - this can overwhelm system resources with large task counts.
+/// Ideal for scenarios where you need maximum parallelism and have sufficient resources.
+///
+public class ResultUnboundedParallelAsyncProcessor : ResultAbstractAsyncProcessor
+{
+ internal ResultUnboundedParallelAsyncProcessor(IEnumerable items, Func> taskSelector, CancellationTokenSource cancellationTokenSource) : base(items, taskSelector, cancellationTokenSource)
+ {
+ }
+
+ internal override Task Process()
+ {
+ // Start ALL tasks immediately without any throttling
+ // This provides true unbounded parallelism
+ var tasks = TaskWrappers.Select(taskWrapper =>
+ {
+ var task = taskWrapper.Process(CancellationToken);
+ // Fast-path for already completed tasks
+ if (task.IsCompleted)
+ {
+ return task;
+ }
+ return task;
+ });
+
+ return Task.WhenAll(tasks);
+ }
+}
\ No newline at end of file
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor.cs b/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor.cs
new file mode 100644
index 0000000..58dcb23
--- /dev/null
+++ b/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor.cs
@@ -0,0 +1,33 @@
+using EnumerableAsyncProcessor.RunnableProcessors.Abstract;
+
+namespace EnumerableAsyncProcessor.RunnableProcessors;
+
+///
+/// A specialized parallel processor that starts ALL tasks immediately without any concurrency limits.
+/// WARNING: Use with caution - this can overwhelm system resources with large task counts.
+/// Ideal for scenarios where you need maximum parallelism and have sufficient resources.
+///
+public class UnboundedParallelAsyncProcessor : AbstractAsyncProcessor
+{
+ internal UnboundedParallelAsyncProcessor(int count, Func taskSelector, CancellationTokenSource cancellationTokenSource) : base(count, taskSelector, cancellationTokenSource)
+ {
+ }
+
+ internal override Task Process()
+ {
+ // Start ALL tasks immediately without any throttling
+ // This provides true unbounded parallelism
+ var tasks = TaskWrappers.Select(taskWrapper =>
+ {
+ var task = taskWrapper.Process(CancellationToken);
+ // Fast-path for already completed tasks
+ if (task.IsCompleted)
+ {
+ return task;
+ }
+ return task;
+ });
+
+ return Task.WhenAll(tasks);
+ }
+}
\ No newline at end of file
diff --git a/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor_1.cs b/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor_1.cs
new file mode 100644
index 0000000..476ed8c
--- /dev/null
+++ b/EnumerableAsyncProcessor/RunnableProcessors/UnboundedParallelAsyncProcessor_1.cs
@@ -0,0 +1,33 @@
+using EnumerableAsyncProcessor.RunnableProcessors.Abstract;
+
+namespace EnumerableAsyncProcessor.RunnableProcessors;
+
+///
+/// A specialized parallel processor that starts ALL tasks immediately without any concurrency limits.
+/// WARNING: Use with caution - this can overwhelm system resources with large task counts.
+/// Ideal for scenarios where you need maximum parallelism and have sufficient resources.
+///
+public class UnboundedParallelAsyncProcessor : AbstractAsyncProcessor
+{
+ internal UnboundedParallelAsyncProcessor(IEnumerable items, Func taskSelector, CancellationTokenSource cancellationTokenSource) : base(items, taskSelector, cancellationTokenSource)
+ {
+ }
+
+ internal override Task Process()
+ {
+ // Start ALL tasks immediately without any throttling
+ // This provides true unbounded parallelism
+ var tasks = TaskWrappers.Select(taskWrapper =>
+ {
+ var task = taskWrapper.Process(CancellationToken);
+ // Fast-path for already completed tasks
+ if (task.IsCompleted)
+ {
+ return task;
+ }
+ return task;
+ });
+
+ return Task.WhenAll(tasks);
+ }
+}
\ No newline at end of file