Lines Matching refs:pool
57 pool = multiprocessing.Pool(PROCESSES)
58 print 'pool = %s' % pool
68 results = [pool.apply_async(calculate, t) for t in TASKS]
69 imap_it = pool.imap(calculatestar, TASKS)
70 imap_unordered_it = pool.imap_unordered(calculatestar, TASKS)
88 for x in pool.map(calculatestar, TASKS):
105 B = pool.map(pow3, xrange(N))
110 C = list(pool.imap(pow3, xrange(N), chunksize=N//8))
127 B = pool.map(noop, L)
132 C = list(pool.imap(noop, L, chunksize=len(L)//8))
148 print pool.apply(f, (5,))
155 print pool.map(f, range(10))
162 print list(pool.imap(f, range(10)))
168 it = pool.imap(f, range(10))
190 res = pool.apply_async(calculate, TASKS[0])
202 it = pool.imap(calculatestar, TASKS)
223 r = pool.apply_async(mul, (7, 8), callback=A.append)
226 r = pool.map_async(pow3, range(10), callback=A.extend)
238 assert not pool._cache, 'cache = %r' % pool._cache
246 for worker in pool._pool:
249 result = pool.apply_async(time.sleep, [0.5])
250 pool.close()
251 pool.join()
255 for worker in pool._pool:
266 pool = multiprocessing.Pool(2)
268 ignore = pool.apply(pow3, [2])
269 results = [pool.apply_async(time.sleep, [DELTA]) for i in range(100)]
270 pool.terminate()
271 pool.join()
273 for worker in pool._pool:
284 pool = multiprocessing.Pool(2)
286 processes = pool._pool
287 ignore = pool.apply(pow3, [2])
288 results = [pool.apply_async(time.sleep, [DELTA]) for i in range(100)]
290 results = pool = None