|
Re: hGetBuf (or something related) broken for 6.2 with sockets: msg#00030lang.haskell.glasgow.bugs
On Fri, Dec 19, 2003 at 10:26:02AM -0000, Simon Marlow wrote: > > > On Thu, Dec 18, 2003 at 09:53:50PM +0100, Tomasz Zielonka wrote: > > > On Thu, Dec 18, 2003 at 07:44:58PM +0100, George Russell wrote: > > > > > > It seems to work when I change hGetBuf to > > hGetBufNonBlocking. The name > > > is a bit misleading - the action _does_ wait for some data, > > but it doesn't > > > wait for all requested bytes. > > > > I've made a mistake here. > > > > hGetBuf waits for filling the whole Handle's reading buffer > > (or reaching > > EOF), even if the buffer contains enough data to satisfy the request. > > I'm a bit lost. Do things work as you expect, or not? Well, I think that it would be better if hGetBuf didn't block if all requested data was already in buffer, but I don't insist on it. However this change of semantics can brake existing programs. In my programs I rather use Data.Array.IO.hGetArray. I was only trying to help George. I am sorry if I only made things more complicated :) > Cheers, > Simon Best regards, Tom -- .signature: Too many levels of symbolic links
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: repeated import warning, Simon Peyton-Jones |
|---|---|
| Next by Date: | RE: Possible unboxed tuples bug., Simon Peyton-Jones |
| Previous by Thread: | RE: hGetBuf (or something related) broken for 6.2 with sockets, Simon Marlow |
| Next by Thread: | Re: hGetBuf (or something related) broken for 6.2 with sockets, Tomasz Zielonka |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |