Lines Matching refs:executor

68             self.executor = self.executor_type(max_workers=self.worker_count)
74 self.executor.shutdown(wait=True)
81 # Make sure that the executor is ready to do work before running the
83 futures = [self.executor.submit(time.sleep, 0.1)
100 self.executor.shutdown()
102 self.executor.submit,
120 fs = [self.executor.submit(time.sleep, 0.1) for _ in range(50)]
121 self.executor.shutdown()
131 self.executor.submit(mul, 21, 2)
132 self.executor.submit(mul, 6, 7)
133 self.executor.submit(mul, 3, 14)
134 self.assertEqual(len(self.executor._threads), 3)
135 self.executor.shutdown()
136 for t in self.executor._threads:
141 executor = e
145 for t in executor._threads:
149 executor = futures.ThreadPoolExecutor(max_workers=5)
150 executor.map(abs, range(-5, 5))
151 threads = executor._threads
152 del executor
158 executor = futures.ThreadPoolExecutor(
160 executor.map(abs, range(-5, 5))
161 threads = executor._threads
162 del executor
169 executor = futures.ThreadPoolExecutor(max_workers=5)
170 executor.map(abs, range(-5, 5))
171 threads = executor._threads
172 del executor
187 self.executor.submit(mul, 21, 2)
188 self.executor.submit(mul, 6, 7)
189 self.executor.submit(mul, 3, 14)
190 self.assertEqual(len(self.executor._processes), 5)
191 processes = self.executor._processes
192 self.executor.shutdown()
207 executor = futures.ProcessPoolExecutor(max_workers=5)
208 list(executor.map(abs, range(-5, 5)))
209 queue_management_thread = executor._queue_management_thread
210 processes = executor._processes
211 del executor
221 future1 = self.executor.submit(mul, 21, 2)
222 future2 = self.executor.submit(time.sleep, 1.5)
232 future1 = self.executor.submit(time.sleep, 1.5)
244 future1 = self.executor.submit(mul, 2, 21)
245 future2 = self.executor.submit(sleep_and_raise, 1.5)
246 future3 = self.executor.submit(time.sleep, 3)
256 future1 = self.executor.submit(divmod, 21, 0)
257 future2 = self.executor.submit(time.sleep, 1.5)
272 future1 = self.executor.submit(time.sleep, 2)
282 future1 = self.executor.submit(divmod, 2, 0)
283 future2 = self.executor.submit(mul, 2, 21)
301 future1 = self.executor.submit(mul, 6, 7)
302 future2 = self.executor.submit(time.sleep, 6)
330 fs = {self.executor.submit(future_func) for i in range(100)}
344 future1 = self.executor.submit(mul, 2, 21)
345 future2 = self.executor.submit(mul, 7, 6)
360 future1 = self.executor.submit(time.sleep, 2)
381 future1 = self.executor.submit(time.sleep, 2)
398 future = self.executor.submit(pow, 2, 8)
402 future = self.executor.submit(mul, 2, y=8)
407 list(self.executor.map(pow, range(10), range(10))),
411 i = self.executor.map(divmod, [1, 1, 1, 1], [2, 3, 0, 5])
419 for i in self.executor.map(time.sleep,
434 self.executor.map(str, [2] * (self.worker_count + 1))
435 self.executor.shutdown()
446 self.executor.submit(my_object.my_method)
468 self.executor.map(record_finished, range(10))
469 self.executor.shutdown(wait=True)
473 executor = self.executor_type()
474 self.assertEqual(executor._max_workers,
482 futures = [self.executor.submit(time.sleep, 3)]
484 p = next(iter(self.executor._processes.values()))
489 self.assertRaises(BrokenProcessPool, self.executor.submit, pow, 2, 8)
493 list(self.executor.map(pow, range(40), range(40), chunksize=-1))
497 list(self.executor.map(pow, range(40), range(40), chunksize=6)),
500 list(self.executor.map(pow, range(40), range(40), chunksize=50)),
503 list(self.executor.map(pow, range(40), range(40), chunksize=40)),
514 future = self.executor.submit(self._test_traceback)