[ecspy] r118 committed - Forgot to close the multiprocessing pool; this potentially leads to an...

3 views
Skip to first unread message

ec...@googlecode.com

unread,
Nov 20, 2011, 4:57:34 PM11/20/11
to ec...@googlegroups.com
Revision: 118
Author: jellef...@gmail.com
Date: Sun Nov 20 13:57:01 2011
Log: Forgot to close the multiprocessing pool; this potentially leads
to an OS error, complaining about to many open files. Thanks
niko.sonnenschein for the bug report...
http://code.google.com/p/ecspy/source/detail?r=118

Modified:
/trunk/ecspy/evaluators.py

=======================================
--- /trunk/ecspy/evaluators.py Sat May 7 20:04:29 2011
+++ /trunk/ecspy/evaluators.py Sun Nov 20 13:57:01 2011
@@ -194,6 +194,7 @@
try:
pool = multiprocessing.Pool(processes=nprocs)
results = [pool.apply_async(evaluator, ([c], {})) for c in
candidates]
+ pool.close()
return [r.get()[0] for r in results]
except (OSError, RuntimeError) as e:
logger.error('failed parallel fitness evaluation using
multiprocessing')

Reply all
Reply to author
Forward
0 new messages