Skip to content

Chunk Streams

Latest
Compare
Choose a tag to compare
@Moderocky Moderocky released this 06 Feb 13:09
· 3 commits to master since this release

This version adds chunk streams, a lazy expecting queue similar to Java's I/O streams for objects.
There are two initial chunk stream implementations:

  1. QueuedChunkStream
    A thread-safe queue-backed stream that blocks for the next expected element.
    This is designed for scenarios where one end of the stream is expected to be significantly faster (e.g. the input shoves all the elements in at once, and the output deals with the result bit-by-bit.)

  2. HandshakeChunkStream
    A thread-safe single element stream that 'handshakes' each element over to the other thread. This will throttle the two threads together while the element gets passed over. This is designed for scenarios where elements need to be passed and dealt with carefully, and the result may impact the stream itself.

Full Changelog: https://github.com/Moderocky/Jupiter/commits/1.0.3