MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / run

Method run

tests/unit/test_concurrent.py:108–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 return self._stopper.isSet()
107
108 def run(self):
109 while(not self.stopped()):
110 if(self.handler.has_next_callback()):
111 pending_callback = self.handler.get_next_callback()
112 priority_num = pending_callback[0]
113 if (priority_num % 10) == 0 and self.slowdown:
114 self._stopper.wait(.1)
115 callback_args = pending_callback[1]
116 fn, args, kwargs, time_added = callback_args
117 fn([time_added], *args, **kwargs)
118 self._stopper.wait(.001)
119 return
120
121class ConcurrencyTest((unittest.TestCase)):
122

Callers

nothing calls this directly

Calls 4

stoppedMethod · 0.95
has_next_callbackMethod · 0.80
get_next_callbackMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected