Skip to content

Version 1.1.0

Choose a tag to compare

@StormBytePP StormBytePP released this 13 Sep 19:33
· 63 commits to master since this release

[Summary]

StormByte Buffer is the byte-buffer module of the StormByte C++ suite.

It depends on StormByte Base and optionally StormByte Logger. This repository is not Base, Config, Crypto, Database, Logger, Multimedia, Network or System.

Public headers under StormByte/buffer/ cover FIFO, SharedFIFO, Ring, Producer/Consumer, Hopper, Sink, Bridge and Pipeline.

If you landed here from a release link and have not read the tree:

  • What this module is, how to build it, and short examples: README.md
  • License: GNU Lesser General Public License version 3 or later, LICENSE

Added

  • Hopper<T> — single-producer single-consumer (SPSC) typed queue (Type::MoveConstructible) with optional capacity ceiling, non-blocking Pop, Push wait when full, Eof signaling, consumer condition variable notification (Notify), and automatic null item discarding for Type::SmartPointer types.
  • Sink<T> — integer key map of Hopper<T> buckets supporting Bind hopper sharing, terminal producer Drain mode, Ready check, Round-Robin or custom Select index chooser popping, and per-key Capacity, Size, and Full queries.
  • Header implementation files hopper.txx and sink.txx installed alongside public headers (*.txx in cmake/install.cmake).

Changed

  • Updated dependency requirement to StormByte Logger 1.1.0 (and transitively StormByte Base 1.1.0).
  • Routed range and iterator byte APIs through StormByte Base type concepts (Type::ByteInputRange, Type::ByteInputIterator, Type::SentinelFor, Type::SameAs) instead of local standard-library constraints.
  • Limited Hopper<T> and Sink<T> null-item filtering to Type::NullablePointer so only pointer-like values that can be tested for emptiness use the !item path.
  • Documented Sink::EoF() contract: with hoppers, evaluates true when all hoppers are empty and Hopper::EoF() is true, even if this Sink itself did not call Eof(); binding a new key after EoF() returned true may return EoF() to false.

Fixed

  • Ported Buffer exceptions to StormByte::Component, preventing format-string overload ambiguity and correctly prefixing ReadError and WriteError messages.
  • Moved virtual override definitions and destructors to compiled translation units so shared-library builds export stable vtables, RTTI and non-virtual thunks for GCC consumers, with polymorphic consumer coverage in each owning class test.
  • Closed Sink and marked hoppers Eof atomically under m_mutex in Sink::Eof and checked closed state and consumer.m_consumer under lock in Sink::Bind to prevent concurrent Bind calls from creating un-marked hoppers or skipping consumer Notify.
  • Marked Sink closed in destructor to safely unblock threads waiting in Push and Pop.