Converting pool to use producer/consumer model.