public ActorConcurrencyLock(ActorBase owner, ActorConcurrencySettings actorConcurrencySettings)
 {
     this.owner                     = owner;
     this.reentrancyMode            = actorConcurrencySettings.ReentrancyMode;
     this.turnLock                  = new SemaphoreSlim(1, 1);
     this.reentrantLock             = new SemaphoreSlim(1, 1);
     this.initialCallContext        = Guid.NewGuid().ToString();
     this.currentCallContext        = this.initialCallContext;
     this.currentCallCount          = 0;
     this.turnLockTimeout           = actorConcurrencySettings.LockTimeout;
     this.turnLockTimeoutRandomizer = GetRandomizer(this.turnLockTimeout, out turnLockWaitMaxRandomIntervalMillis);
 }
コード例 #2
0
 internal ActorConcurrencySettings(ActorConcurrencySettings other)
 {
     this.reentrancyMode = other.ReentrancyMode;
     this.lockTimeout    = other.lockTimeout;
 }