sharpcompress icon indicating copy to clipboard operation
sharpcompress copied to clipboard

Fix Windows-only RAR multi-threading test failure

Open Copilot opened this issue 3 months ago • 3 comments

  • [x] Create IRarUnpackFactory interface with factory implementations
  • [x] Update RarStream to use factory pattern for creating owned IRarUnpack instances
  • [x] Support both factory (non-solid) and shared instance (solid) modes
  • [x] Update RarCrcStream and RarBLAKE2spStream for both modes
  • [x] Update RarArchiveEntry to use factory for non-solid, shared for solid
  • [x] Update RarReader to use factory for non-solid, shared for solid
  • [x] Verify all 871 tests pass
  • [x] Code review
  • [x] Security scan (CodeQL)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Nov 27 '25 16:11 Copilot

@copilot refactor so that each RarStream gets given a new instance of IRarunpack instead of removing multi-thread support

adamhathcock avatar Nov 29 '25 13:11 adamhathcock

@copilot refactor so that each RarStream gets given a new instance of IRarunpack instead of removing multi-thread support

Refactored in acffccd and 3ec4035. Each RarStream now gets a new IRarUnpack instance for non-solid archives, enabling multi-threading. Solid archives continue to use the shared instance since they require sequential processing. Added ownsUnpack parameter to RarStream to properly manage disposal of the Unpack instances.

Copilot avatar Nov 29 '25 13:11 Copilot

@copilot continue

adamhathcock avatar Nov 29 '25 15:11 adamhathcock