internal Task EnableConfirmation(int maxunconfirmedMessages) { if (_confirmationKeeper != null) { throw new Exception("Already set"); } _confirmationKeeper = new MessagesPendingConfirmationKeeper(maxunconfirmedMessages, _cancellationToken); return(_io.__SendConfirmSelect(noWait: false)); }
public void Dispose() { if (_confirmationKeeper != null) { _confirmationKeeper.DrainDueToShutdown(); _confirmationKeeper.Dispose(); _confirmationKeeper = null; } this._io.Dispose(); }