Hi Gyula,

the assumption is that the AsyncCollector is either completed by the user
or, if you have a timeout defined, that it will be completed with a timeout
exception. This means that if you have no timeout defined, then you have to
make sure that the collector is completed. Otherwise you will have
lingering state which is never cleared. In that sense it follows the
semantics of normal futures.

What do you mean by creating more than one future? More than one future
which completes the AsyncCollector? If that's the case, then the first
future which completes will also complete the AsyncCollector and the result
of the other future should be ignored.

Cheers,
Till
​

On Mon, Feb 20, 2017 at 2:53 PM, Gyula Fóra <gyf...@apache.org> wrote:

> Hi,
>
> I was looking at the AsyncFunction interface and try to wrap my head around
> the implementation and the assumptions and I have some questions, maybe
> somebody could help me out :)
>
> What happens if the user does not collect any data or set a future to do so
> in the invoke method?
> Also what happens if I create more than one Future?
>
> It seems that the "streamRecordBufferEntry"  logic assumes that there will
> be a Future that eventually collects 1 thing or the user does this
> directly.
> Do I understand correctly? If not I am probably missing the part where the
> buffer entry is removed immediately if no async request was made.
>
> Thank you!
> Gyula
>

Reply via email to