Repository navigation
docs(fs,net): comments on close - #821
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies the semantics of async close() across FS and net types (especially around clonability and dropped futures), and adds missing close() APIs for Windows named pipes to address the Clone vs close confusion raised in #819.
Changes:
- Add cross-references in
close()rustdocs for multiple socket types to point to the detailedTcpStream::closesemantics. - Expand
File::closeandTcpStream::closedocumentation to explain clone-related completion behavior and pending-operation implications. - Add
close()methods forNamedPipeServerandNamedPipeClient(and refactor the underlying handle wrapper to usecompio_fs::File).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| compio-net/src/unix.rs | Adds rustdoc cross-reference to TcpStream::close for Unix socket close semantics. |
| compio-net/src/udp.rs | Adds rustdoc cross-reference to TcpStream::close for UDP close semantics. |
| compio-net/src/tcp.rs | Adds rustdoc cross-reference for listener close; expands TcpStream::close docs with clone/pending-op caveats. |
| compio-fs/src/pipe/mod.rs | Adds rustdoc cross-reference to File::close for FIFO sender/receiver close semantics. |
| compio-fs/src/named_pipe.rs | Adds missing close() for named pipe server/client and switches internal handle wrapper to File. |
| compio-fs/src/file.rs | Expands File::close docs with clone/pending-op caveats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Berrysoft
added this pull request to the merge queue
Mar 31, 2026
Merged
via the queue into
compio-rs:master
with commit Mar 31, 2026
83d6b79
116 of 120 checks passed
Closed
Open
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also add the lacking
closefor named pipe.Close #819