Skip to content

7.0.0-rc1

Pre-release
Pre-release

Choose a tag to compare

@ocoanet ocoanet released this 07 Sep 16:54
· 19 commits to master since this release

Major changes

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 Start and Halt
    • Make Start/Halt return a task that represents the startup/halt of the disruptor.

Before, Start/Halt would 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 handler OnShutdown, which could be quite problematic if OnShutdown needed 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 ISequenceBarrierOptions is 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/Halt return 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.WaitUntilStarted which can be replaced by Start().Wait()
    • Remove WorkProcessor.HaltLater
    • Remove WorkerPool.DrainAndHalt
    • Add WorkerPool.HasBacklog
    • Remove TaskCreationOptions from IEventProcessor.Start

Minor changes

  • Add net8.0 target
  • Use a value type for gating sequence cache sequence in MultiProducerSequencer (PERF)
  • Adjust SingleProducerSequencer layout (PERF)
  • Split AsyncWaitStrategy and TimeoutAsyncWaitStrategy
  • Remove allocations from AsyncWaitStrategy (PERF)
  • Remove allocations from TimeoutAsyncWaitStrategy (PERF)
  • Add base interface for event handlers: IEventHandler