mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-23 23:20:33 +00:00
formatting
This commit is contained in:
@@ -153,14 +153,15 @@ private:
|
||||
Policy policy,
|
||||
Callback&& replaceCallback = nullptr);
|
||||
|
||||
/** canonicalizeImpl variant for callers that already hold `mutex_`.
|
||||
|
||||
The unnamed `scoped_lock<mutex_type> const&` parameter is proof of
|
||||
ownership; this overload does not acquire the lock. Use it from other
|
||||
methods (e.g. fetchAndModify) that need to compose canonicalize with
|
||||
additional work under a single critical section, without relying on
|
||||
recursive-mutex re-entry.
|
||||
*/
|
||||
/**
|
||||
* canonicalizeImpl variant for callers that already hold `mutex_`.
|
||||
*
|
||||
* The unnamed `scoped_lock<mutex_type> const&` parameter is proof of
|
||||
* ownership; this overload does not acquire the lock. Use it from other
|
||||
* methods (e.g. fetchAndModify) that need to compose canonicalize with
|
||||
* additional work under a single critical section, without relying on
|
||||
* recursive-mutex re-entry.
|
||||
*/
|
||||
template <class Policy, class Callback = std::nullptr_t>
|
||||
bool
|
||||
canonicalizeImpl(
|
||||
@@ -277,17 +278,18 @@ public:
|
||||
fetch(key_type const& digest, Handler const& h);
|
||||
// End CachedSLEs functions.
|
||||
|
||||
/** Fetch or create an entry and execute a callback while holding the lock.
|
||||
|
||||
The entry for the given key is fetched from the cache or created if it
|
||||
doesn't exist. The callback is then invoked with a reference to the
|
||||
entry while the cache mutex is still held, allowing safe modification
|
||||
of the cached object.
|
||||
|
||||
@param key The key to fetch or create
|
||||
@param callback Function to call with the entry under lock.
|
||||
Signature: void(T&)
|
||||
*/
|
||||
/**
|
||||
* Fetch or create an entry and execute a callback while holding the lock.
|
||||
*
|
||||
* The entry for the given key is fetched from the cache or created if it
|
||||
* doesn't exist. The callback is then invoked with a reference to the
|
||||
* entry while the cache mutex is still held, allowing safe modification
|
||||
* of the cached object.
|
||||
*
|
||||
* @param key The key to fetch or create
|
||||
* @param callback Function to call with the entry under lock.
|
||||
* Signature: void(T&)
|
||||
*/
|
||||
template <class Callback>
|
||||
void
|
||||
fetchAndModify(key_type const& key, Callback&& callback);
|
||||
|
||||
Reference in New Issue
Block a user