diff options
author | Sven Gothel <[email protected]> | 2023-01-02 07:46:23 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-02 07:46:23 +0100 |
commit | 1a7985e17d9ba9a9627ee66d4aca660636d3f8e6 (patch) | |
tree | 3f4c8d1b4fb7801ed90048420cab34b8d219ae99 /include/catch2 | |
parent | dc0a26783a2c2e0a5912302d00216f99b009d3b5 (diff) |
jau::ringbuffer: Add 'End of Stream' (EOS) concept and utilize it for jau::io::ByteInStream_[URL|Feed]'s available() and read() operation.v1.1.1
jau::ringbuffer: Add 'End of Stream' (EOS) concept to unblock all read-operations from this point onwards
and unblocking a potentially currently blocked reader thread.
The EOS concept is required to allow blocking operations from a consumer (reader) w/o knowledge of the content-size,
having the producer (writer) signaling EOS at the end and unblocking all read-operations.
Fuerther, after unblocking a potentially blocker reader-thread,
the failure criteria is now being checked as for the `timeout` case.
This allows a read-thread being unblocked (interrupted) after writing the last chunk
and hence picking up this last written data.
+++
Utilize ringbuffer EOS concept for jau::io::ByteInStream_[URL|Feed]'s available() and read() operation,
i.e. both methods utilize blocking operations.
After the producer (URL: Our Curl consume callback; Feed: Manual set_eof()) marks EOS on the ringbuffer,
all blocking read-operations are permanently unblocked and a current read-thread also interrupted.
+++
Passed test_bytestream01 and test_iostream01
while causing full CPU load via `stress --cpu $(getconf _NPROCESSORS_ONLN)`.
Diffstat (limited to 'include/catch2')
0 files changed, 0 insertions, 0 deletions