add waitWithSemaphore to folly::wangle
Summary: It may be useful to wait for a future to finish. This adds a utility function to do so, returning a completed future. NB: While it doesn't matter which thread executes the `then`, there does need to be two threads. If not, this will deadlock forever. I'm not sure if there's a way to detect/prevent that. Test Plan: added some unit tests. Reviewed By: hans@fb.com FB internal diff: D1319330
Showing
Please register or sign in to comment