Skip to content

refactor: custom AsyncSequence for HTTPBody progress tracking - #6

Merged
grdsdev merged 1 commit into
mainfrom
refactor/httpbody-progress
Nov 4, 2025
Merged

refactor: custom AsyncSequence for HTTPBody progress tracking#6
grdsdev merged 1 commit into
mainfrom
refactor/httpbody-progress

Conversation

@grdsdev

@grdsdev grdsdev commented Nov 4, 2025

Copy link
Copy Markdown
Owner

No description provided.

@grdsdev
grdsdev force-pushed the refactor/httpbody-progress branch from a2676b3 to 042fe93 Compare November 4, 2025 12:09
@grdsdev
grdsdev requested a review from Copilot November 4, 2025 12:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the trackingProgress method to improve Swift concurrency safety by extracting progress tracking logic into a dedicated async sequence type and adding @Sendable annotations.

  • Added @Sendable attribute to the progress handler closure to ensure thread safety
  • Extracted progress tracking logic into a new ProgressTrackingSequence struct
  • Moved mutable state (totalBytesProcessed) from a captured variable into the iterator

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grdsdev
grdsdev merged commit d1f5ccc into main Nov 4, 2025
11 checks passed
@grdsdev
grdsdev deleted the refactor/httpbody-progress branch November 4, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants