>   It opens and closes each file in turn; but it would it be
>   unwise to open and close each file as we'd read a chunk from
>   it? This would allow arbitrary interleaving.

If I understand you correctly, you are proposing processing several
files in parallel, so to interleave IO. If the `files' in question are
communication pipes, or if KAIO (kernel asynchronous IO) is
available, it is indeed a good strategy. The last example in the file


(called test_driver_mux) demonstrates how to interleave IO with
Iteratees. Iteratees of course do not care how the source data have
been obtained, with or without interleaving.
Haskell-Cafe mailing list

Reply via email to