Please describe the feature you’d like to see added.
I have noticed that in the Bitcoin source code, almost all thread-safe sections use RecursiveGuard
.
As we all know, RecursiveGuard
is exclusive, which can impact system performance and concurrency.
At the same time, I have also noticed another issue specifically tracking the replacement of RecursiveMutex
with Mutex
, which would help reduce some of the locking overhead.
However, I think Mutex
is still exclusive. For modules like the transaction pool, which involve both reading and writing transactions—such as querying pending transactions and inserting new ones.
wouldn’t using a read-write lock (SharedMutex)
directly provide better performance? If I make this kind of modification, is it officially recommended?
Is your feature related to a problem, if so please describe it.
No response
Describe the solution you’d like
No response
Describe any alternatives you’ve considered
No response
Please leave any additional context
No response