[PATCH] Branch and pull-- now with remote

Aaron Bentley aaron.bentley at utoronto.ca
Mon Jun 6 14:24:22 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
| On 29 May 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
|
| I'm thinking of some kind of producer/consumer or blackboard model
| where the main program adds URLs to a queue that it wants, and then
| one or more HTTP threads pull them down and eventually mark them as
| either complete or failed.

Yes.  I've done some thinking about this for Arch, and what I'd like is
an interface where "get" produces file-like objects.  Each file-like
object is will asynchonously download.  If there is not enough data to
satisfy the read() request, we do select(), and buffer data for other
get requests, until select() says there's data for the file we're
actually interested in.  Lather, rinse, repeat.

The stage of buffering data for other requests prevents starvation where
we wait for data from one descriptor that will never come in because the
buffer's full of data for another descriptor.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCpE6G0F+nu1YWqI0RApv5AJ0cli++9ecTjc74iHlz9SBEq6X4QQCggjtk
C+zZPtbYqOZ338eG20sR3/o=
=5xVx
-----END PGP SIGNATURE-----




More information about the bazaar mailing list