コード例 #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
ファイル: DownloadRateLimiter.py プロジェクト: hitzjd/DHT
 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
コード例 #4
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
コード例 #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
ファイル: DownloadRateLimiter.py プロジェクト: hitzjd/DHT
 def throttle(self):
     #log( "throttle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.throttle_connections()
コード例 #8
0
 def throttle(self):
     #log( "throttle" )
     for l in iter_rand_pos(self._throttle_listeners):
         l.throttle_connections()