[Haskell-cafe] lazy strings and parallel read
manlio_perillo at libero.it
Fri Sep 19 13:50:11 EDT 2008
Duncan Coutts ha scritto:
> On Fri, 2008-09-19 at 18:46 +0200, Manlio Perillo wrote:
>> Don Stewart ha scritto:
>>>> After having read
>>>> I have a doubt about Data.ByteString.Lazy.
>>>> Why getContents function don't use pread (or an emulation, if not
>>> Why would it?
>> So that you don't need to open the same file multiple time:
> We are constrained here by the semantics of Handle which requires
> that getContents semi-close the Handle (which in turn is to make it
> harder to shoot yourself in the foot while doing lazy IO).
But if every function that reads the data uses pread, then this should
no more be a problem.
Or I'm missing some other thing?
More information about the Haskell-Cafe