Exemple #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
 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
Exemple #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
Exemple #5
0
 def throttle_connections(self):
     self.throttled = True
     for c in iter_rand_pos(self.connectors):
         c.connection.pause_reading()
 def throttle_connections(self):
     self.throttled = True
     for c in iter_rand_pos(self.connectors):
         c.connection.pause_reading()
Exemple #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()