Preserve async disposal across all supported frameworks

This commit is contained in:
Adam Hathcock
2026-10-13 12:57:14 +01:00
parent 3bbe0cc93f
commit e58fcb23e5
29 changed files with 141 additions and 149 deletions

View File

@@ -694,6 +694,8 @@ using (var archive = ZipArchive.OpenArchive("archive.zip", options))
### Async Extract with Cancellation
Async archive and reader/writer operations dispose SharpCompress resources asynchronously on every target, including .NET Framework 4.8 and .NET Standard 2.0. `SharpCompressStream.DisposeAsync()` and `ZlibStream.DisposeAsync()` are available on every target; stream wrappers forward disposal to runtime `IAsyncDisposable` implementations where available, falling back to synchronous disposal only for streams that do not support it.
```csharp
var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromMinutes(5));