Rework the message passing in pool to have better error handling.