Fix wrong usage of Pool

We should call pool.close() and pool.join() to destroy pool

Change-Id: Ib6b41d445687710df9cd5c1c064d07a75b633302
Closes-bug: #1238289