[Tensorpipe Agent] Call Shutdown from Destructor and Join (#37839)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37839
Calling `RpcAgent::shutdown` from the TensorpipeAgent will ensure that parent class threads are joined and the atomic is set to False.
ghstack-source-id: 103496383
Test Plan: CI Build - no Tensorpipe Agent tests yet
Differential Revision: D21291974
fbshipit-source-id: 50cab929b021faf7f80e0e8139d0c7d1788a3a6c