Catch exceptions and still write to the queue

If you throw and exception in the thread pool you'll deadlock.

This patch ensures that it doesn't deadlock, although the onus is still on the user to check that `results.length` matches the size of the pool.

Once I work out how to deal with that condition sanely, I'll issue a followup patch.