folly icon indicating copy to clipboard operation
folly copied to clipboard

ThreadPoolExecutor: How to know whether one of the workers threw an exception?

Open adshastri opened this issue 2 years ago • 0 comments

It seems that exceptions are caught and swallowed for a thread pool executor: https://github.com/facebook/folly/blob/53637452d07ff8c24a77d3f5f73bbe79af501ba3/folly/executors/ThreadPoolExecutor.cpp#L133.

When I call join on the executor, is there a way to know whether a thread has failed and bubble up the exception?

adshastri avatar Apr 25 '22 18:04 adshastri