-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On ongoing branch of making everything async #565
base: master
Are you sure you want to change the base?
Conversation
adamhathcock
commented
Feb 1, 2021
•
edited
Loading
edited
- Use ReadAsync/WriteAsync on every stream
- Use CancelationToken (drop Listener interface?)
- Use ValueToken (need to find better Task.Completed version)
- Use IAsyncDisposable (drop IDispose as it mostly doesn't apply)
- Use IAsyncEnumerable
- Some usage of Memory/Span. Usage of MemoryPool seem good but don't want to completely convert yet.
- More?
@@ -137,11 +139,11 @@ private bool DoesKeyMatchExisting(string key) | |||
return false; | |||
} | |||
|
|||
public void SaveTo(Stream stream, WriterOptions options) | |||
public async Task SaveToAsync(Stream stream, WriterOptions options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CancellationToken parameter should be passed through whole call chain and exposed to library consumers (as non-mandatory parameter on top level). Otherwise caller won't be able to cancel running operation (timeouts).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely something I want to do. I might miss more. Need to find a Rider plugin to help me catch it.
# Conflicts: # src/SharpCompress/Archives/GZip/GZipArchive.cs # src/SharpCompress/Common/GZip/GZipFilePart.cs # src/SharpCompress/Common/Tar/Headers/TarHeader.cs # src/SharpCompress/Common/Zip/SeekableZipHeaderFactory.cs # src/SharpCompress/Common/Zip/ZipFilePart.cs # src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs # src/SharpCompress/Compressors/LZMA/LZipStream.cs # src/SharpCompress/Compressors/Xz/BinaryUtils.cs # src/SharpCompress/Compressors/Xz/Crc32.cs # src/SharpCompress/Writers/Tar/TarWriter.cs # src/SharpCompress/Writers/Zip/ZipCentralDirectoryEntry.cs # src/SharpCompress/Writers/Zip/ZipWriter.cs
is there any plan on continuing this work? |
Not from me anytime soon as my personal and professional life is too busy. Sorry. |
Hi. Can we expect asynchrony support in the near future? |