forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement WakeupSelect() to allow preliminary wakeup after message push
This adds the reading side of a pipe to the read-set when calling select(). Writing to the writing side of the pipe then causes select() to wake up immediately. Otherwise it would wait for the timeout of 50ms, even if there is data that could possibly be sent. This is useful when many messages need are pushed with optimistic send being disabled. After all messages have been pushed, WakeSelect() can then wakeup the select() thread and force a re-check for pending data to send. This is currently only implemented for POSIX compliant systems as we assume that heavy-load daemons (like masternodes) are usually run on Linux.
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters