Skip to content

Commit 566d84a

Browse files
committed
Documentation.
1 parent e030fc1 commit 566d84a

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ Provides various classes and interfaces to facilitate thread-based processing.
99
## ProcessorThreadPool
1010

1111
``` c#
12-
public ProcessorThreadPool(string name, int threadCount, IProcessorFactory processorFactory, ProcessorThreadOptions processorThreadOptions);
12+
public ProcessorThreadPool(
13+
string name,
14+
int threadCount,
15+
IServiceScopeFactory serviceScopeFactory,
16+
IProcessorFactory processorFactory,
17+
ProcessorThreadOptions processorThreadOptions
18+
);
1319
```
1420

15-
Each thread pool has a `name` used only for identyfing the pool. The `threadCount` determines the number of `ProcessorThread` instances in the pool. Each `ProcessorThread` calls the `IProcessor.Execute(CancellationToken)` method, or `IProcessor.ExecuteAsync(CancellationToken)` method if started asynchronously, on the instance provided by the `IProcessorFactory.Create()` method in a loop while the `CancellationToken.IsCancellationRequested` returns `false`.
21+
Each thread pool has a `name` used only for identyfing the pool. The `threadCount` determines the number of `ProcessorThread` instances in the pool. Each `ProcessorThread` calls the `IProcessor.ExecuteAsync(CancellationToken)` method on the instance provided by the `IProcessorFactory.Create()` method in a loop while the `CancellationToken.IsCancellationRequested` returns `false`.
22+
23+
Every call to `IProcessor.ExecuteAsync(ProcessorThreadContext, CancellationToken)` is wrapped in a `ProcessorThreadContext` instance that provides the `State` along with the `IServiceScope` instance created by the `IServiceScopeFactory.CreateScope()` method.
1624

1725
## ProcessorThreadOptions
1826

0 commit comments

Comments
 (0)