pytorch
35ea8779 - Prevent using anything other than intrusive_ptr for Future (#58421)

Commit
3 years ago
Prevent using anything other than intrusive_ptr for Future (#58421) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/58421 Here I make it impossible to create Futures that do not use intrusive_ptr, by making the constructor private. This makes it safer (by "forcing" people to do the right thing) and prevents a proliferation of new shared_ptrs or of accidental copies/moves. ghstack-source-id: 129567047 Test Plan: CI Reviewed By: mrshenli Differential Revision: D28474484 fbshipit-source-id: 82c487e1bb7c27a2e78cb5d594e00e54c752bf09
Author
lw lw
Parents
Loading