forked from ponylang/ponyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup TCPConnection GC-safety mechanism for writev buffers
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
- Loading branch information
Showing
2 changed files
with
56 additions
and
56 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