Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add WithReadThreshold API #298

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

feat: add WithReadThreshold API #298

wants to merge 7 commits into from

Conversation

joway
Copy link
Member

@joway joway commented Dec 7, 2023

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

feat: 添加 WithReadThreshold API

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

关键代码:

  1. poller 通过 intputAck 检查是否当前已经读取的数据超出了阈值。若是,则移除 epollin (此时还需要判断是否正在等待可写入事件)
  2. 用户代码每次 waitRead 结束,都会判断本次读取是否能够将 intputBuffer 长度缩小到 readThreshold 以内。如果可以的话就恢复读取
  3. dialer 支持 netpoll.Option 参数

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@joway joway requested review from a team as code owners December 7, 2023 09:30
@joway joway force-pushed the feat/read-throttle branch 4 times, most recently from 09dbbd1 to 129d68a Compare December 7, 2023 10:01
connection_reactor.go Outdated Show resolved Hide resolved
connection_impl.go Outdated Show resolved Hide resolved
@joway joway force-pushed the feat/read-throttle branch 2 times, most recently from b96fdda to 49fbf6b Compare December 8, 2023 03:23
@joway joway force-pushed the feat/read-throttle branch 8 times, most recently from f03817a to b63d10a Compare December 22, 2023 03:41
connection_errors.go Outdated Show resolved Hide resolved
connection_errors.go Outdated Show resolved Hide resolved
connection_reactor.go Outdated Show resolved Hide resolved
poll.go Outdated Show resolved Hide resolved
connection_impl.go Outdated Show resolved Hide resolved
poll_default_bsd.go Outdated Show resolved Hide resolved
@joway joway force-pushed the feat/read-throttle branch 5 times, most recently from 1492553 to b1bee1b Compare January 10, 2024 07:30
@joway joway mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants