forked from mirror/async-std
Merge #157
157: More robust file implementation r=stjepang a=stjepang This is a reimplementation of the `File`s state machine. The previous implementation was simple and a bit naive. It was not fundamentally wrong but had surprises in some corner cases. For example, if an async read operation was started but we timed out on it, the file cursor would move even though we didn't complete the operation. The new implementation will move the cursor only when read/write operations complete successfully. There was also a deadlock hazard in the case where multiple tasks were concurrently reading or writing to the same file, in which case some task wakeups would be lost. This PR fixes the problem. A nice consequence of this PR: `futures-channel` is now unused, so we can remove it from the dependency list. Co-authored-by: Stjepan Glavina <stjepang@gmail.com>staging
commit
a8a2ae9e29
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue