mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
79b7db4d91
Summary: Currently, `runOnDestruction` aims to be thread-safe; new callbacks are added to the `onDestructionCallbacks_` list while the associated mutex is held. However, the caller may own the `LoopCallback` and wish to destroy/cancel it before the `EventBase` destructor runs, and this callback cancellation is not thread-safe, since unlinking does not happen under the lock protecting `onDestructionCallbacks_`. The primary motivation of this diff is to make on-destruction callback cancellation thread-safe; in particular, it is safe to cancel an on-destruction callback concurrently with `~EventBase()`. Reviewed By: spalamarchuk Differential Revision: D13440552 fbshipit-source-id: 65cee1e361d37647920baaad4490dd26b791315d |
||
---|---|---|
.. | ||
benchmarks | ||
cli | ||
docs | ||
fs | ||
integration | ||
py | ||
scripts | ||
test_support | ||
test-data | ||
third-party | ||
win | ||
.pyre_configuration.local | ||
Eden.project.toml |