appendToFront semantics

Torarin torarind at gmail.com
Tue Feb 15 15:21:39 PST 2011


2011/2/15 Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:
> On 2/15/11 12:10 PM, Adam Ruppe wrote:
>>
>> One problem with "at least" is it might have to wait for two
>> packets to come off the network interface; could be fairly slow.
>
> Another is that the stream may end... so there's no guarantee.
>
> Andrei
>

If the stream ends it would return short. Anyway, my main point was to
allow it to read more than n elements. So if you give it the
definition "try to append n elements or more" it caters for the "don't
block and don't consume more memory than this" situation as well.

Torarin


More information about the Digitalmars-d mailing list