-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add spec for HTTP::Server#close #5958
Add spec for HTTP::Server#close #5958
Conversation
For some reason on linux the spec fails when run together with the I have really no idea what side effect might influence this. |
3a92ee0
to
e7776ab
Compare
This has also popped up in #6027. It seems to be related to |
e7776ab
to
0eed03c
Compare
The spec seems to pass now as intended. Maybe the issue that caused it to fail on linux was resolved in the mean time in another PR... At least this spec can probably be merged now to detect regressions in the future. |
context.response.puts "foo" | ||
context.response.flush | ||
|
||
Fiber.yield |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no doc for Fiber.yield
, could you please explain how it works here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fiber.yield
gives the scheduler the possibility to yield execution to a different fiber.
This was a sloppy implementation though and has been replaced since then in #6953
This PR adds a spec for
HTTP::Server#close
that is shuts down gracefully and active requests can be finished.See also #5957