chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] srfi-18 and blocking i/o


From: Robert Smiley
Subject: [Chicken-hackers] srfi-18 and blocking i/o
Date: Sun, 17 Jul 2016 22:48:19 -0600

Hi everyone. I wrote some I/O routines to get around the following problem documented in the srfi-18 section of the manual on the wiki.

"Blocking I/O will block all threads, except for some socket operations (see the section about the tcp unit). An exception is the read-eval-print loop on UNIX platforms: waiting for input will not block other threads, provided the current input port reads input from a console."

Some people commented on chicken-users when I released the library that it would be nice to not have all threads block in core due to i/o.

Having taken a look at library.scm, I was wondering if this could be addressed by modifying the read and write procedures of the streaming port class to call ##sys#thread-block-for-i/o! from scheduler.scm.

I'm also curious if there is a good reason why ports were implemented in that way in the first place, as it looks like effort has been put into bypassing this issue in certain cases (sockets and the unix repl).

Cheers,

-Robert


reply via email to

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