chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Asynchronous I/O Egg Release


From: John Cowan
Subject: Re: [Chicken-users] Asynchronous I/O Egg Release
Date: Thu, 30 Jun 2016 15:39:43 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Chris Vine scripsit:

> The same effect can be achieved with other ports using
> thread-wait-for-i/o!, which although blocking also yields and only
> resumes when there is something available to read.  I don't have a
> problem with that: you just need to go with it.  And that is what the
> original poster's egg should be using.

Is there some reason why this isn't the default mode?  It seems to me
that what we want is for all standard Scheme operations to block the
thread that invokes them and no other threads, so that the programming
model is synchronous I/O (as RnRS demands) but threads still "work".
Disk operations aren't exactly instantaneous either, and shouldn't
block other threads that may be doing computations.

Providing asynchronous I/O to the user is a completely different thing.
I personally wouldn't want to use it, but I know there are reasons why
some people would.

> This is a general manifestation of one of the problems with "green"
> threads, and one of the reasons I don't like them: any inadvertent
> blocking on system calls jams everything.

Indeed, but it's a problem that the underlying system should hide
completely.  If not, I call it a design defect.

-- 
John Cowan          http://www.ccil.org/~cowan        address@hidden
To say that Bilbo's breath was taken away is no description at all.  There are
no words left to express his staggerment, since Men changed the language that
they learned of elves in the days when all the world was wonderful. --The Hobbit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]