mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-14 12:10:42 +02:00
Update ValidationInterface() documentation to explicitly specify threading and memory model
This commit is contained in:
parent
b296b425a7
commit
cbeaa91dbb
@ -53,6 +53,21 @@ void CallFunctionInValidationInterfaceQueue(std::function<void ()> func);
|
|||||||
*/
|
*/
|
||||||
void SyncWithValidationInterfaceQueue();
|
void SyncWithValidationInterfaceQueue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement this to subscribe to events generated in validation
|
||||||
|
*
|
||||||
|
* Each CValidationInterface() subscriber will receive event callbacks
|
||||||
|
* in the order in which the events were generated by validation.
|
||||||
|
* Furthermore, each ValidationInterface() subscriber may assume that
|
||||||
|
* callbacks effectively run in a single thread with single-threaded
|
||||||
|
* memory consistency. That is, for a given ValidationInterface()
|
||||||
|
* instantiation, each callback will complete before the next one is
|
||||||
|
* invoked. This means, for example when a block is connected that the
|
||||||
|
* UpdatedBlockTip() callback may depend on an operation performed in
|
||||||
|
* the BlockConnected() callback without worrying about explicit
|
||||||
|
* synchronization. No ordering should be assumed across
|
||||||
|
* ValidationInterface() subscribers.
|
||||||
|
*/
|
||||||
class CValidationInterface {
|
class CValidationInterface {
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user