proposal: io/v2: add Context parameter to Reader, etc.
Related to #18507, it would be nice if the `io` interface methods all took in `Context` as their first parameter. This allows a cancellation signal to be attached directly to the I/O calls that are using them, instead of requiring an out-of-band method, as in `net.Conn`. This is obviously a backward-incompatible change and would have broad impact on the ecosystem. I wanted to open this as a proposal for consideration in Go 2. **EDIT:** See [below](https://github.com/golang/go/issues/20280#issuecomment-320712428) for the more backward-compatible proposal **EDIT 2:** I've written an experience report/blog post detailing the background for this proposal: [Canceling I/O in Go Cap’n Proto](https://medium.com/@zombiezen/canceling-i-o-in-go-capn-proto-5ae8c09c5b29). Feedback and alternatives welcome.
Posted by zombiezen on May 8, 2017, 3:00 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
proposal: io/v2: add Context parameter to Reader, etc.
Related to #18507, it would be nice if the `io` interface methods all took in `Context` as their first parameter. This allows a cancellation signal to be attached directly to the I/O calls that are using them, instead of requiring an out-of-band method, as in `net.Conn`. This is obviously a backward-incompatible change and would have broad impact on the ecosystem. I wanted to open this as a proposal for consideration in Go 2. **EDIT:** See [below](https://github.com/golang/go/issues/20280#issuecomment-320712428) for the more backward-compatible proposal **EDIT 2:** I've written an experience report/blog post detailing the background for this proposal: [Canceling I/O in Go Cap’n Proto](https://medium.com/@zombiezen/canceling-i-o-in-go-capn-proto-5ae8c09c5b29). Feedback and alternatives welcome.
Comments (0)
No comments yet. Start the discussion.