cooker: roll our own process pool
authorChristopher Larson <chris_larson@mentor.com>
Mon, 9 Jan 2012 18:31:32 +0000 (12:31 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Feb 2012 20:25:29 +0000 (20:25 +0000)
commitb533d8256ea78e68053ec3a86d8196e3cf18682f
tree0453acea5f51667721e800d29e1d154976f65256
parent48b0b45fa7d9126ee69afebc8c5830408eb06456
cooker: roll our own process pool

This fixes the hang issue encountered with parse errors. The underlying issue
seems to have been the pool.terminate(). This sends SIGTERM to each of the
multiprocessing pool's processes, however, a python process terminating in
this fashion can corrupt any queues it's interacting with, causing a number of
problems for us (e.g. the queue that sends events to the UI).

So instead of using multiprocessing's pool, we roll our own, with the ability
to cancel the work. In the very long term, the python concurrent.futures
module introduced in python 3.2 could be used to resolve this as well.

(Bitbake rev: 7c39cfd8e060cca8753ac4114775447b18e13067)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py