Files
scylladb/core
Nadav Har'El c5f61666d3 input_stream::consume() overhaul
Our input_stream::consume() mechanism allows feeding data from an input
stream into a consumer, piece by piece, until the consumer doesn't want
any more. It currently assumed the input can block (when reading from disk),
but the consumption is assumed to be immediate. This patch adds support for
blocking in the consumption function: The consumer now returns a future
which it promises to fulfill after consuming the given buffer.

This patch goes further by somewhat simplifying (?) the interface of the
consumer. Instead of receiving a mysterious "done" lambda the consumer
is supposed to call when done (doesn't want any more input), the consumer
now returns a future<optional<temporary_buffer<char>>, which means:

1. The future is fulfilled when the consumer is done with this buffer
   and either wants more - or wants to stop.

2. If the consumer wants to stop, it returns the *remaining* part of the
   buffer it didn't want to process (this will be pushed back into the
   input stream).

3. If the consumer is not done, and wants to consume more, it returns an
   unset optional.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-05-19 19:33:18 +03:00
..
2015-03-01 15:29:13 +02:00
2015-04-02 10:27:38 +03:00
2015-04-19 10:33:38 +03:00
2015-03-11 14:45:43 +02:00
2015-05-17 15:57:11 +03:00
2015-05-19 19:33:18 +03:00
2015-03-15 20:18:17 +02:00
2015-05-19 19:33:18 +03:00
2015-05-17 15:57:11 +03:00
2015-03-03 14:58:58 +02:00
2015-05-11 13:33:33 +03:00
2015-03-24 10:12:47 +02:00
2015-05-14 11:26:58 +03:00