Skip to content

http2: only schedule write when necessary#17183

Closed
addaleax wants to merge 4 commits intonodejs:masterfrom
addaleax:http2-setimmediate
Closed

http2: only schedule write when necessary#17183
addaleax wants to merge 4 commits intonodejs:masterfrom
addaleax:http2-setimmediate

Conversation

@addaleax
Copy link
Member

  • src: add optional keep-alive object to SetImmediate

    Adds the possibility to keep a strong persistent reference to
    a JS object while a SetImmediate() call is in effect.

  • http2: don't call into JS from GC

    Calling into JS land from GC is not allowed, so delay
    the resolution of pending pings when a session is destroyed.

  • http2: only schedule write when necessary

    Introduce an Http2Scope class that, when it goes out of scope,
    checks whether a write to the network is desired by nghttp2.
    If that is the case, schedule a write using SetImmediate()
    rather than a custom per-session libuv handle.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http2

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants