On 03 February 2006 08:34, Bulat Ziganshin wrote:
moreover - we can implement locking as special converter type,
that can be applied to any mutable object - stream, collection,
counter. that allows to simplify implementations and add locking
only to those Streams where we really need it. like
Simon Marlow wrote:
-- | Takes an output stream and an input stream, and pipes all the
-- data from the former into the latter.
streamConnect :: (OutputStream o, InputStream i) = o - i - IO ()
That's the wrong way around, of course :-) It pipes everything from the
input stream to the output
Hello Simon,
Friday, January 27, 2006, 7:25:44 PM, you wrote:
i'm now write some sort of new i/o library. one area where i currently
lacks in comparision to the existing Handles implementation in GHC, is
the asynchronous i/o operations. can you please briefly describe how
this is done in GHC
Hello Duncan,
Saturday, January 28, 2006, 3:08:04 PM, you wrote:
yes, i want to save exactly this bit of performance - after i
optimized all other expenses on the path of text i/o
DC There is a trade off, using mmap gives you zero-copy access to the page
DC cache however there is a
Hello Simon
i'm now write some sort of new i/o library. one area where i currently
lacks in comparision to the existing Handles implementation in GHC, is
the asynchronous i/o operations. can you please briefly describe how
this is done in GHC and partially - why the multiple buffers are used
On 27.01 13:10, Bulat Ziganshin wrote:
i'm now write some sort of new i/o library. one area where i currently
lacks in comparision to the existing Handles implementation in GHC, is
the asynchronous i/o operations. can you please briefly describe how
this is done in GHC and partially - why
Hello Einar,
Friday, January 27, 2006, 4:19:55 PM, you wrote:
EK One simple optimization is that you can omit all buffering with
EK unbuffered operation. Then simply add the buffer (which is ok
EK because Handles are mutable) if the user ever calls hLookAhead.
yes, i do it
moreover, i have an
Hello Duncan,
Friday, January 27, 2006, 4:00:28 PM, you wrote:
moreover, i have an idea how to implement async i/o without complex
burecreacy: use mmapped files, may be together with miltiple buffers.
for example, we can allocate four 16kb buffers. when one buffer is
filled with written
Bulat Ziganshin wrote:
i'm now write some sort of new i/o library. one area where i currently
lacks in comparision to the existing Handles implementation in GHC, is
the asynchronous i/o operations. can you please briefly describe how
this is done in GHC and partially - why the multiple buffers