Fixing Potential TSAN issue with joining RPC helper threads (#36094)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36094
The condition variable waiting in the RPC retry thread must be notified after setting the atomic running to False. This will cause ensure the thread is joinable, and allow `rpc.shutdown` to function correctly
ghstack-source-id: 101538860
Test Plan: build bot
Differential Revision: D20854763
fbshipit-source-id: b92050712a1e6c31d4dd3b3d98f32ef8dee0f2f2