-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows a 'file.close.wait' to return a true close return value. And it fixes the problem of indefinitely hanging when the SharedFd was still held by an in-flight operation. It simplifies the low level close logic, using the async uring close operation when the caller is using file.close.wait but using the synchronous close mechanism provided by the std library when the SharedFd is allowed to go out of scope without having been closed first. Manual closing of the file should be encouraged because it allows the user to see the return code. In order to let the file owner call close and not hang when an in-flight was still in progress, this reworks the future to return when it sees the strong reference count drop to 1. Fixes #122.
- Loading branch information
Showing
6 changed files
with
99 additions
and
93 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
mod accept; | ||
|
||
mod close; | ||
pub(crate) use close::Close; | ||
|
||
mod connect; | ||
|
||
|
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
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