Lines Matching full:executor
142 self.executor = self.executor_type(max_workers=self.worker_count)
149 self.executor.shutdown(wait=True)
156 # Make sure that the executor is ready to do work before running the
158 futures = [self.executor.submit(time.sleep, 0.1)
175 self.executor.shutdown()
177 self.executor.submit,
195 fs = [self.executor.submit(time.sleep, 0.1) for _ in range(50)]
196 self.executor.shutdown()
206 self.executor.submit(mul, 21, 2)
207 self.executor.submit(mul, 6, 7)
208 self.executor.submit(mul, 3, 14)
209 self.assertEqual(len(self.executor._threads), 3)
210 self.executor.shutdown()
211 for t in self.executor._threads:
216 executor = e
220 for t in executor._threads:
224 executor = futures.ThreadPoolExecutor(max_workers=5)
225 executor.map(abs, range(-5, 5))
226 threads = executor._threads
227 del executor
234 executor = futures.ThreadPoolExecutor(
236 executor.map(abs, range(-5, 5))
237 threads = executor._threads
238 del executor
246 executor = futures.ThreadPoolExecutor(max_workers=5)
247 executor.map(abs, range(-5, 5))
248 threads = executor._threads
249 del executor
264 self.executor.submit(mul, 21, 2)
265 self.executor.submit(mul, 6, 7)
266 self.executor.submit(mul, 3, 14)
267 self.assertEqual(len(self.executor._processes), 5)
268 processes = self.executor._processes
269 self.executor.shutdown()
284 executor = futures.ProcessPoolExecutor(max_workers=5)
285 list(executor.map(abs, range(-5, 5)))
286 queue_management_thread = executor._queue_management_thread
287 processes = executor._processes
288 del executor
299 future1 = self.executor.submit(mul, 21, 2)
300 future2 = self.executor.submit(time.sleep, 1.5)
310 future1 = self.executor.submit(time.sleep, 1.5)
322 future1 = self.executor.submit(mul, 2, 21)
323 future2 = self.executor.submit(sleep_and_raise, 1.5)
324 future3 = self.executor.submit(time.sleep, 3)
334 future1 = self.executor.submit(divmod, 21, 0)
335 future2 = self.executor.submit(time.sleep, 1.5)
350 future1 = self.executor.submit(time.sleep, 2)
360 future1 = self.executor.submit(divmod, 2, 0)
361 future2 = self.executor.submit(mul, 2, 21)
379 future1 = self.executor.submit(mul, 6, 7)
380 future2 = self.executor.submit(time.sleep, 3)
408 fs = set(self.executor.submit(future_func) for i in range(100))
422 future1 = self.executor.submit(mul, 2, 21)
423 future2 = self.executor.submit(mul, 7, 6)
438 future1 = self.executor.submit(time.sleep, 2)
459 future1 = self.executor.submit(time.sleep, 2)
473 # Executor.shutdown() and context manager usage is tested by
476 future = self.executor.submit(pow, 2, 8)
480 future = self.executor.submit(mul, 2, y=8)
485 list(self.executor.map(pow, range(10), range(10))),
489 i = self.executor.map(divmod, [1, 1, 1, 1], [2, 3, 0, 5])
497 for i in self.executor.map(time.sleep,
523 self.executor.map(record_finished, range(10))
524 self.executor.shutdown(wait=True)
528 executor = self.executor_type()
529 self.assertEqual(executor._max_workers,