LPS-36418 A more robust way to prevent scheduler thread pool hanging.