7.0.0-rc1
Pre-release
Pre-release
Major changes
- Add IPC-based disruptor (#79)
The IpcDisruptor is built on a value-type-based ring buffer stored in a shared memory-mapped file. This design allows the IpcDisruptor to support remote publication, i.e.: event publication from other processes on the same machine.
- Refactor Disruptor
StartandHalt- Make
Start/Haltreturn a task that represents the startup/halt of the disruptor.
- Make
Before,
Start/Haltwould return immediately without waiting for the event handlers startup/shutdown.
If the application main thread exited after invoking Halt, then the application would stop without running
the event handlerOnShutdown, which could be quite problematic ifOnShutdownneeded to perform critical
cleanup code.
- Make Disruptor and event processors disposable
- Refactor wait strategies and sequence barriers (BREAKING CHANGE)
- Wait strategies now create dedicated waiters for each event processor
- Sequence barriers are now simpler and
ISequenceBarrierOptionsis removed - Sequence barriers no longer wait for published sequences by default
- Disruptors now create dedicated sequence barriers for each event processor
- Use a dedicated type to identify sequencer waiter owners
The wait strategy API is now based on both IWaitStrategy and ISequenceWaiter.
If you need to migrate an existing wait strategy, you can follow the V7 migration sample.
- Refactor event processors (BREAKING CHANGE)
- Make
Start/Haltreturn a task that represents the startup/shutdown of the processors - Add a dedicated type to factorize processors state management
- Move processors cancellation tokens out of the sequence barriers
- Remove
IEventProcessor.WaitUntilStartedwhich can be replaced byStart().Wait() - Remove
WorkProcessor.HaltLater - Remove
WorkerPool.DrainAndHalt - Add
WorkerPool.HasBacklog - Remove
TaskCreationOptionsfromIEventProcessor.Start
- Make
Minor changes
- Add net8.0 target
- Use a value type for gating sequence cache sequence in
MultiProducerSequencer(PERF) - Adjust
SingleProducerSequencerlayout (PERF) - Split
AsyncWaitStrategyandTimeoutAsyncWaitStrategy - Remove allocations from
AsyncWaitStrategy(PERF) - Remove allocations from
TimeoutAsyncWaitStrategy(PERF) - Add base interface for event handlers: IEventHandler