Skip to content

refactor(cache): Replace channel with downloadState struct for better concurrency management - #269

Merged
kalbasit merged 1 commit into
mainfrom
integrate_download_state
Aug 24, 2025
Merged

kalbasit merged 1 commit into
mainfrom
integrate_download_state

Conversation

@kalbasit

@kalbasit kalbasit commented Aug 24, 2025 •

Copy link
Copy Markdown
Owner

Refactor NAR download state management

Introduced a downloadState struct to replace the simple channel used for tracking NAR download jobs. This provides a clearer abstraction for managing download state and completion signaling.

The refactoring:

  • Created a dedicated downloadState type with a done channel
  • Renamed pullNar to pullNarIntoStore for better clarity
  • Added defer done() to simplify cleanup in download functions
  • Updated job tracking to use the new state object throughout the codebase

This change improves code organization and makes the download state management more explicit.

@kalbasit
kalbasit marked this pull request as ready for review August 24, 2025 22:27
@kalbasit kalbasit changed the title clarify name a bit refactor(cache): Replace channel with downloadState struct for better concurrency management Aug 24, 2025
@kalbasit
kalbasit changed the base branch from intermidiate_download_location to graphite-base/269 August 24, 2025 22:44

kalbasit commented Aug 24, 2025 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Aug 24, 10:44 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Aug 24, 10:44 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Aug 24, 10:53 PM UTC: @kalbasit merged this pull request with Graphite.

@kalbasit
kalbasit force-pushed the integrate_download_state branch from 5cc5805 to 410684a Compare August 24, 2025 22:46
@kalbasit
kalbasit changed the base branch from graphite-base/269 to main August 24, 2025 22:46
@kalbasit
kalbasit merged commit cc2d16f into main Aug 24, 2025
@kalbasit
kalbasit deleted the integrate_download_state branch August 24, 2025 22:53
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.

1 participant