Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor our 'suspend operation' logic on bufferevents.
There are lots of things we do internally in bufferevents to indicate "the user would like this operation to happen, but we aren't going to try until some other condition goes away." Our logic here has gotten entirely too complicated. This patch tries to fix that by adding the idea of 'suspend flags' for read and write. To say "don't bother reading or writing until condition X no longer holds," bufferevent_suspend_read/write(bev, BEV_SUSPEND_X). When X no longer holds, call bufferevent_unsuspend_read/write(bev, BEV_SUSPEND_X). Right now, only the read-watermark logic uses this.
- Loading branch information
1 parent
438f9ed
commit 0d744aa
Showing
2 changed files
with
86 additions
and
19 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