Version 1.1.0
[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-blockingPop,Pushwait when full,Eofsignaling, consumer condition variable notification (Notify), and automatic null item discarding forType::SmartPointertypes.Sink<T>— integer key map ofHopper<T>buckets supportingBindhopper sharing, terminal producerDrainmode,Readycheck, Round-Robin or customSelectindex chooser popping, and per-keyCapacity,Size, andFullqueries.- Header implementation files
hopper.txxandsink.txxinstalled alongside public headers (*.txxincmake/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>andSink<T>null-item filtering toType::NullablePointerso only pointer-like values that can be tested for emptiness use the!itempath. - Documented
Sink::EoF()contract: with hoppers, evaluatestruewhen all hoppers are empty andHopper::EoF()istrue, even if thisSinkitself did not callEof(); binding a new key afterEoF()returnedtruemay returnEoF()tofalse.
Fixed
- Ported Buffer exceptions to
StormByte::Component, preventing format-string overload ambiguity and correctly prefixingReadErrorandWriteErrormessages. - 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
Sinkand marked hoppersEofatomically underm_mutexinSink::Eofand checked closed state andconsumer.m_consumerunder lock inSink::Bindto prevent concurrentBindcalls from creating un-marked hoppers or skipping consumerNotify. - Marked
Sinkclosed in destructor to safely unblock threads waiting inPushandPop.