From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: hidden buffers for async Date: Sun, 12 Jun 2005 20:48:07 +0100 Message-ID: <87u0k3cq6g.fsf@kanga.tapsellferrier.co.uk> References: <6dbd4d0005060619227dd41364@mail.gmail.com> <87vf4oaft8.fsf@zemdatav.stor.no-ip.org> <87vf4oaao5.fsf@kanga.tapsellferrier.co.uk> <87ll5ka5j7.fsf@zemdatav.stor.no-ip.org> <87is0oa35h.fsf_-_@kanga.tapsellferrier.co.uk> <874qc4tzbo.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118605798 12468 80.91.229.2 (12 Jun 2005 19:49:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2005 19:49:58 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 21:49:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DhYSN-0008E3-Qd for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 21:49:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhYX1-0002sY-Sm for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 15:54:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DhYVm-0002IM-TR for emacs-devel@gnu.org; Sun, 12 Jun 2005 15:52:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DhYVi-0002GQ-48 for emacs-devel@gnu.org; Sun, 12 Jun 2005 15:52:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhYVh-0002Fi-Dw for emacs-devel@gnu.org; Sun, 12 Jun 2005 15:52:45 -0400 Original-Received: from [80.168.156.78] (helo=owls-tree.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DhYVM-0000nt-Uw; Sun, 12 Jun 2005 15:52:25 -0400 Original-Received: from [80.168.156.68] (helo=kanga) by owls-tree.tapsellferrier.co.uk with esmtp (Exim 4.50 #1 (Debian)) id 1DhYRC-0007Fy-Q0; Sun, 12 Jun 2005 20:48:06 +0100 Original-Received: from nferrier by kanga with local (Exim 4.44) id 1DhYRF-0007mr-Cs; Sun, 12 Jun 2005 20:48:09 +0100 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 12 Jun 2005 06:30:06 -0400") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38662 Richard Stallman writes: > The number of buffers would be 1:1 with the number of files being > downloaded. Aggregating the data is the problem I was trying to avoid. > Because the downloads all finish at different times it makes sorting > the data difficult. > > When you say "sorting the data", do you mean that literally? No. > What I would think of doing is simply looking thru the data > assembling the contents that add up to one file, and saving it out > when it is complete. The advantage of multiple buffers is that the downloaded files can be viewed straight away, with no further copying. Some files could even be viewed *while* they were still downloading. A bit like a browser does with image files. > I agree that downloading a lot of files will be silly. Perhaps I will > set up a pool of 20 or so buffers for downloads and block or error > when the pool is exhausted. > > That should work, if it is ok to do only 20 transfers in parallel. > It should block, not error, when all are in use. Why? If this code were an elisp library I think I would expect it to error... and then user code could choose to block on repeated calls with a time delay. Wouldn't that be better? (Sorry, this is an important question to me, since I am going to implement this code). Nic