If a current tarball found its way onto a webserver I could try to 
integrate ratelimiting into it.

But an implimentation question: currently I did ratelimiting by making the 
SNAC sending call sleep() until sending the packet would not go over the 
limit. Is there a better way to do this? Would it be better to span a new 
thread (or five, one for each rateclass) to send packets out of a queue?

I suppose the real question is whether the calls to sendSNAC() are 
themselves multithreaded, as causing the whole thing to sleep() is a bad 
idea. Does a delay in sendSNAC() block other things happening internally?

~Chris
From [EMAIL PROTECTED]  Sat Jan 29 07:58:59 2005
From: [EMAIL PROTECTED] (Daniel Henninger)
Date: Sat Jan 29 07:58:59 2005
Subject: [py-transports] Ratelimiting implementation
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

I have put up "current tarballs" at:
http://www.vorpalcloud.org/tarballs/

As for the multithreaded sendSNAC question, I'm not 100% sure.  I tried
throwing a sleep in there to see how it went and it seems to behave in a
reasonable manner.  I really don't have a good answer for you though.  =/

Daniel

-- 
"The most addictive drug in the world is music."
     - The Lost Boyz

> If a current tarball found its way onto a webserver I could try to
> integrate ratelimiting into it.
>
> But an implimentation question: currently I did ratelimiting by making the
> SNAC sending call sleep() until sending the packet would not go over the
> limit. Is there a better way to do this? Would it be better to span a new
> thread (or five, one for each rateclass) to send packets out of a queue?
>
> I suppose the real question is whether the calls to sendSNAC() are
> themselves multithreaded, as causing the whole thing to sleep() is a bad
> idea. Does a delay in sendSNAC() block other things happening internally?
>
> ~Chris
> _______________________________________________
> py-transports mailing list
> [EMAIL PROTECTED]
> http://mail.jabber.org/mailman/listinfo/py-transports
>

Reply via email to