Browse Source

modify queue processor count with option config.

master
Savorboard 7 years ago
parent
commit
c371f008f2
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      src/DotNetCore.CAP/Processor/IDispatcher.Default.cs
  2. +2
    -1
      src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs

+ 1
- 1
src/DotNetCore.CAP/Processor/IDispatcher.Default.cs View File

@@ -49,7 +49,7 @@ namespace DotNetCore.CAP.Processor
try
{
var worked = await Step(context);
context.ThrowIfStopping();

Waiting = true;


+ 2
- 1
src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs View File

@@ -39,8 +39,9 @@ namespace DotNetCore.CAP.Processor

public void Start()
{
var processorCount = Environment.ProcessorCount;
var processorCount = _options.QueueProcessorCount;
_processors = GetProcessors(processorCount);

_logger.ServerStarting(processorCount, _processors.Length);

_context = new ProcessingContext(_provider, _cts.Token);


Loading…
Cancel
Save