Add guard to run on current thread (#52361)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/52361
Test Plan:
buck build //xplat/caffe2:aten_test_test_thread_pool_guard
./aten_test_test_thread_pool_guard
Reviewed By: kimishpatel
Differential Revision: D26429540
fbshipit-source-id: 16e4a56d4bf9b73b1ea1ff88d7dc6730e0b1e029