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

Cleanup TCPConnection GC-safety mechanism for writev buffers #3177

Merged
merged 2 commits into from
Jun 9, 2019

Conversation

dipinhora
Copy link
Contributor

Prior to this commit, the TCPConnection pending_writev buffer had to
have a secondary buffer called _pending to ensure that the data
wouldn't get GC'd too early by the runtime.

This commit removes that hack and replaces it with a slightly different
hack based on the strategy used in File in PR #2775. The hacky part
is that now we have two buffers for writev data. One for windows
(_pending_windows) and one for non-windows (_pending_posix) to
account for the difference in order of the struct between windows
and posix. This, however, seems less bad than the previous hack of
having the secondary buffer to ensure GC safety.

resolves #2782
resolves #2779

dipinhora added a commit to dipinhora/ponyc that referenced this pull request Jun 9, 2019
dipinhora added a commit to dipinhora/ponyc that referenced this pull request Jun 9, 2019
@SeanTAllen
Copy link
Member

@dipinhora i resolved the commit conflict with CHANGELOG but, there still appears to be a rebase against master that is needed before this can be merged.

dipinhora and others added 2 commits June 9, 2019 15:45
Prior to this commit, the TCPConnection `pending_writev` buffer had to
have a secondary buffer called `_pending` to ensure that the data
wouldn't get GC'd too early by the runtime.

This commit removes that hack and replaces it with a slightly different
hack based on the strategy used in `File` in PR ponylang#2775. The hacky part
is that now we have two buffers for `writev` data. One for windows
(`_pending_windows`) and one for non-windows (`_pending_posix`) to
account for the difference in order of the struct between windows
and posix. This, however, seems less bad than the previous hack of
having the secondary buffer to ensure GC safety.

resolves ponylang#2782
resolves ponylang#2779
@dipinhora
Copy link
Contributor Author

@SeanTAllen rebased.

@SeanTAllen SeanTAllen merged commit 44f1ea9 into ponylang:master Jun 9, 2019
patches11 pushed a commit to patches11/ponyc that referenced this pull request Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants