예제 #1
0
 def unthrottle_connections(self):
     self.throttled = False
     for c in iter_rand_pos(self.connectors):
         c.connection.resume_reading()
         # arg. resume actually flushes the buffers in iocpreactor, so
         # we have to check the state constantly
         if self.throttled:
             break
예제 #2
0
 def unthrottle_connections(self):
     self.throttled = False
     for c in iter_rand_pos(self.connectors):
         c.connection.resume_reading()
         # arg. resume actually flushes the buffers in iocpreactor, so
         # we have to check the state constantly
         if self.throttled:
             break
예제 #3
0
 def unthrottle(self):
     #log( "unthrottle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.unthrottle_connections()
         # arg. resume actually flushes the buffers in iocpreactor, so we
         # have to check the state constantly
         if self._token_bucket <= 0:
             break
 def unthrottle(self):
     #log( "unthrottle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.unthrottle_connections()
         # arg. resume actually flushes the buffers in iocpreactor, so we
         # have to check the state constantly
         if self._token_bucket <= 0:
             break
예제 #5
0
 def throttle_connections(self):
     self.throttled = True
     for c in iter_rand_pos(self.connectors):
         c.connection.pause_reading()
예제 #6
0
 def throttle_connections(self):
     self.throttled = True
     for c in iter_rand_pos(self.connectors):
         c.connection.pause_reading()
예제 #7
0
 def throttle(self):
     #log( "throttle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.throttle_connections()
 def throttle(self):
     #log( "throttle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.throttle_connections()