private void WriteOrDelay(Action writeRequestProducer) { if (writing) { messageStash.Stash(); } else { writeRequestProducer(); var wPending = WritePending; if (wPending) { Write(NextCorrelationId()); } if (wPending && StateSync) { writing = true; } else if (StateSync) { messageStash.Unstash(); } } }
public sealed override void StashCommand() { if (writeReplyHandling || IsEventHandling) { throw new StashException($"{nameof(Stash)} must not be used in event handler or persist handler"); } else { commandStash.Stash(); } }
public void Stash() { _userStash.Stash(); }