restoring get_parallelism method