Added syncronization scheduler

This commit is contained in:
Federico Barresi
2020-01-21 14:32:09 +01:00
parent 92c50dce54
commit 5f352cfe46
2 changed files with 148 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ using System.Reactive.Subjects;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Sharp7.Rx.Basics;
using Sharp7.Rx.Enums;
using Sharp7.Rx.Extensions;
using Sharp7.Rx.Interfaces;
@@ -23,7 +24,7 @@ namespace Sharp7.Rx
private ConcurrentDictionary<string, S7VariableAddress> s7VariableAddresses = new ConcurrentDictionary<string, S7VariableAddress>();
private readonly CompositeDisposable disposables = new CompositeDisposable();
private readonly TaskScheduler scheduler = TaskScheduler.Current;
private readonly LimitedConcurrencyLevelTaskScheduler scheduler = new LimitedConcurrencyLevelTaskScheduler(maxDegreeOfParallelism:1);
private readonly string ipAddress;
private readonly int rackNr;
private readonly int cpuSlotNr;