mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
f3b0124f01
Summary: In order to allow request to timeout to display notifications to the user, the `within` future method will need to be called on the various callback futures. Unfortunately, once the timeout expires, the underlying future isn't cancelled and stopped, but the unique pointer holding the context will be reclaimed. Whenever the future actually completes, it will try to use an invalid pointer, crashing EdenFS. To solve this, switch to using a shared_ptr and copy it in the right places so it will only be freed once all futures holding a reference to it will be gone. I also took the opportunity to reduce the nesting a bit to make the code more readable. Reviewed By: kmancini Differential Revision: D24809647 fbshipit-source-id: 987d6e5763106fabc6bed3ea00d28b129b5285a1 |
||
---|---|---|
.. | ||
benchharness | ||
benchmarks | ||
cli | ||
config | ||
docs | ||
fuse | ||
inodes | ||
journal | ||
model | ||
monitor | ||
notifications | ||
prjfs | ||
py | ||
rocksdb | ||
scripts | ||
service | ||
sqlite | ||
store | ||
takeover | ||
telemetry | ||
testharness | ||
third-party | ||
utils | ||
CMakeLists.txt |