Skip to content

Commit

Permalink
Make FileChunks Sendable (#2871)
Browse files Browse the repository at this point in the history
Motivation:

`FileChunks` is an `AsyncSequence` so should be `Sendable` otherwise
it's difficult to use.

Modifications:

- Conform `FileChunks` to `Sendable`

Result:

- Resolves #2752
  • Loading branch information
ali-ahsan-ali authored Sep 9, 2024
1 parent 06ff6e8 commit 216975d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/NIOFileSystem/FileChunks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import NIOPosix

/// An `AsyncSequence` of ordered chunks read from a file.
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
public struct FileChunks: AsyncSequence {
public struct FileChunks: AsyncSequence, Sendable {
enum ChunkRange {
case entireFile
case partial(Range<Int64>)
Expand Down

0 comments on commit 216975d

Please sign in to comment.