diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-12-31 02:05:26 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2017-01-12 23:05:24 -0500 |
commit | c5a8b1b946b1ab0bb82bd4270b2a40f5731abcff (patch) | |
tree | a1ee1e54db0ae10d0641c2a6c1ff5189125cb681 /src/versionbits.h | |
parent | c72cc88ed39652e44b5be48e9455f6f395bd7e83 (diff) |
net: rework the way that the messagehandler sleeps
In order to sleep accurately, the message handler needs to know if _any_ node
has more processing that it should do before the entire thread sleeps.
Rather than returning a value that represents whether ProcessMessages
encountered a message that should trigger a disconnnect, interpret the return
value as whether or not that node has more work to do.
Also, use a global fProcessWake value that can be set by other threads,
which takes precedence (for one cycle) over the messagehandler's decision.
Note that the previous behavior was to only process one message per loop
(except in the case of a bad checksum or invalid header). That was changed in
PR #3180.
The only change here in that regard is that the current node now falls to the
back of the processing queue for the bad checksum/invalid header cases.
Diffstat (limited to 'src/versionbits.h')
0 files changed, 0 insertions, 0 deletions