[mnet-devel] BandwidthThrottler patch

Zooko zooko at zooko.com
Mon Feb 3 02:44:17 GMT 2003


> zooko:
> 
> Should this patch go in?

Yes.  This makes it so that the BandwidthThrottler's "used()" method gets called 
every 60 seconds or so.  Without it, BandwidthThrottler will never *unthrottle* 
a choked-off connection.  With it, the choked-off connection will be unthrottled 
60 seconds later.  (That seems like a large number.  5 seconds might be nicer, 
but one would have to look at the kludgey, magic-constant-sensitive behavior of 
BandwidthThrottler before making that change.)

I wonder how this patch ever got *out*?  It should have been in place since time 
immemorial...

--Z

> --- BandwidthThrottler.py	2 Dec 2002 19:58:44 -0000	1.4
> +++ BandwidthThrottler.py	2 Feb 2003 19:31:35 -0000	1.5
> @@ -34,6 +33,11 @@
>          self._lasttick = time()
>          self._throttlecbs = []
>          self._unthrottlecbs = []
> +        self._tick_doq_loop()
> +
> +    def _tick_doq_loop(self):
> +        DoQ.doq._asyncorelooper.add_task(self.used, args=(0,))
> +        DoQ.doq.add_task(self._tick_doq_loop, delay=60)
>  
> 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list