IO concurrency

Max A . K . max630@mail.ru
Thu, 11 Oct 2001 22:09:52 +0700


On Thu, Oct 11, 2001 at 01:28:39PM +0200, Volker Stolz wrote:
> In local.glasgow-haskell-users, you wrote:
>>> 	interact hIn = do
>>> 	    line <- hGetLine hIn
>>>	    numIn <- handleToInt {-made from handleToFd & fdToInt-}
>>>	    -- threadWaitRead numIn {-3-}
>
> Why should uncommenting -3- help when it happens *after* the
> hGetLine? 

It doesn't. It helps if going before. My fault. I pasted to
the msg somehow edited code, so the additional lines and
comments was not checked.

> Is your Tcl-app printing out "click" or "click\n", i.e.
> with the additional linefeed?

Command 'puts "click"' makes implicit line brake, so yes, "click\n"

> Did you try disabling blocking entirely?

I tried. No effect, as expected.

Max.