Small refactoring (simplification in run_in_executor).