From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: Unbuffered socket I/O Date: Thu, 01 Mar 2007 08:24:51 +1100 Message-ID: <87d53u7z6k.fsf@zip.com.au> References: <87mz34ol6r.fsf@laas.fr> <87abz13kxl.fsf@zip.com.au> <877iu59fm8.fsf@laas.fr> <87odng64o3.fsf@ossau.uklinux.net> <87irdox8w7.fsf@laas.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1172697973 13310 80.91.229.12 (28 Feb 2007 21:26:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2007 21:26:13 +0000 (UTC) Cc: Guile-Devel To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Feb 28 22:26:01 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HMWJ9-0007tF-8C for guile-devel@m.gmane.org; Wed, 28 Feb 2007 22:25:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMWJA-0000TZ-0v for guile-devel@m.gmane.org; Wed, 28 Feb 2007 16:25:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HMWIP-0000Cy-5W for guile-devel@gnu.org; Wed, 28 Feb 2007 16:25:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HMWIN-0000Bg-KM for guile-devel@gnu.org; Wed, 28 Feb 2007 16:25:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMWIN-0000Bd-Gz for guile-devel@gnu.org; Wed, 28 Feb 2007 16:25:07 -0500 Original-Received: from mailout1-8.pacific.net.au ([61.8.2.215] helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HMWIM-0002pV-Vx for guile-devel@gnu.org; Wed, 28 Feb 2007 16:25:07 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 301B05A0EF1; Thu, 1 Mar 2007 08:25:02 +1100 (EST) Original-Received: from localhost (ppp22F6.dyn.pacific.net.au [61.8.34.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 90A652740C; Thu, 1 Mar 2007 08:25:01 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1HMWI8-0001bA-39; Thu, 01 Mar 2007 08:24:52 +1100 Mail-Copies-To: never In-Reply-To: <87irdox8w7.fsf@laas.fr> (Ludovic =?iso-8859-1?Q?Court=E8s's?= message of "Tue, 27 Feb 2007 10:11:20 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6581 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > > (uniform-vector-read! vec port))) Slackness in the implementation of that function. It knows a size to read and should come out as a read() system call of that size. Yet it always goes through the port buffer. You need to post the problem instead of leaping to a "solution". read-string!/partial is much better in that respect. Maybe that func should be loosened up to work on non-fports too, that could be nice. It's a bit of a failing of the ptab port functions that there's no "read N bytes", but that needn't prevent uniform-vector-read! doing the right thing on fports. Could think about whether it ought to make multiple calls to fill the requested size. I guess that's how it is now, in effect, so probably yes. Could also think if those calls should then cope with O_NONBLOCK too, by sleeping in select() if finding there's nothing to read yet. On a single read call I would say let it throw an error, but if the aim is to block until the requested size then it's easy enough to cope. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel