internal OverflowQueue(SharedRingBufferMailbox parent) { backoff = new Backoff(); messages = new Queue <IMessage>(); open = false; this.parent = parent; }
internal RingBufferDispatcher(int mailboxSize, long fixedBackoff, int throttlingCount) { closed = new AtomicBoolean(false); backoff = fixedBackoff == 0L ? new Backoff() : new Backoff(fixedBackoff); RequiresExecutionNotification = fixedBackoff == 0L; Mailbox = new SharedRingBufferMailbox(this, mailboxSize); this.throttlingCount = throttlingCount; }
internal RingBufferDispatcher(int mailboxSize, long fixedBackoff, bool notifyOnSend, int throttlingCount) { _closed = new AtomicBoolean(false); _backoff = fixedBackoff == 0L ? new Backoff() : new Backoff(fixedBackoff); RequiresExecutionNotification = fixedBackoff == 0L; Mailbox = new SharedRingBufferMailbox(this, mailboxSize, notifyOnSend); _throttlingCount = throttlingCount; _dispatcherTokenSource = new CancellationTokenSource(); _backoffTokenSource = CancellationTokenSource.CreateLinkedTokenSource(_dispatcherTokenSource.Token); }