[Yum-devel] Fastest mirror selection plugin
Michael Stenner
mstenner at linux.duke.edu
Sat Aug 13 20:56:09 UTC 2005
I really like this idea, and it's clear that it's simple to implement.
However, I'm inclined to implement it with select rather than threads.
Threads aren't bad in a simple case like this, but select is simpler
still. I'm generally inclined to go that route for network stuff.
Using select also has one other advantage: you currently wait the
timeout for all threads to return and then pick the fastest (well,
sort, really). You could also simply stop waiting after you get the
first N responses. So, for example, if your first mirror responds
after 0.2 seconds, you can just stop waiting for the rest. Sure, you
can do that in threads, too, but it's harder.
I'm not unconvincable here. I just wanted throw the idea out and
throw it early so we could talk before you spend a lot of time on it.
-Michael
--
Michael D. Stenner mstenner at ece.arizona.edu
ECE Department, the University of Arizona 520-626-1619
1230 E. Speedway Blvd., Tucson, AZ 85721-0104 ECE 524G
More information about the Yum-devel
mailing list