ThreadPoolExecutor: throw in getPendingTaskCountImpl instead of pure virtual.
Summary: Calling `folly::ThreadPoolExecutor::withAll` is powerfull when combined with `folly::ThreadPoolExecutor::getPoolStats`. However getPendingTaskCountImpl being pure virtual can trigger `__cxa_pure_virtual ... std::terminate()` while object is partially destructed. This change signals implementors of derived clases to write a body for getPendingTaskCountImpl while allowing calling getPoolStats -> getPendingTaskCountImpl within a try/catch block. Reviewed By: yfeldblum Differential Revision: D17915523 fbshipit-source-id: 2ffad7076313407969d88c75c7e457fa4e7e2d6d
Showing
Please register or sign in to comment