[#528] actor에서 Task.detached를 사용하지 않고 백그라운드 스레드로 작업을 할 수 있도록 개선한다#531
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors WebPageImageStoreImpl from an actor to a final class that serializes operations using a private DispatchQueue and withCheckedThrowingContinuation. It also introduces comprehensive unit tests in WebPageImageStoreImplTests.swift to verify saving, deleting, clearing the directory, and concurrent/transactional behavior. The review feedback suggests explicitly conforming WebPageImageStoreImpl to Sendable to ensure compatibility with Swift 6 strict concurrency, which is a highly relevant and actionable improvement.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🔗 연관된 이슈
🎯 의도
actor내부에서Task.detached로 파일 I/O를 수행하면서, 실제 저장 작업이 actor isolation 밖에서 실행되는 문제를 개선하기 위함📝 작업 내용
📌 요약
WebPageImageStoreImpl을actor에서final class로 변경.utilityQoS의 전용DispatchQueue에서 실행하도록 변경Task.detached제거🔍 상세
Task.detached(priority: .utility)로 분리되어 있던 파일 I/O 작업을perform {}내부로 모음perform {}은 전용 serial queue에 작업을 enqueue하고withCheckedThrowingContinuation으로 async API와 연결cachedImageURL,saveImage,dirSizeInBytes,clearDirectory,removeImage가 모두 같은 serial queue를 통해 실행되도록 구성📸 영상 / 이미지 (Optional)