[PATCH openEuler-1.0-LTS 18/41] share_pool: Extract function get_task