Make @rpc.functions.async_execution processing generic (#39485)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39485
Test Plan: Imported from OSS
Differential Revision: D21871421
Pulled By: mrshenli
fbshipit-source-id: d0e4e82a9098cad364ecbcecff76091155cbda23