Ensure mutable properties aren't accessed outside their intended thread-safe usage patterns (#247)

This PR modifies the access level of certain mutable properties to
ensure their thread-safe usage. It doesn't address
https://github.com/apple/containerization/issues/246 at this time.
This commit is contained in:
Dmitry Kovba
2025-08-06 18:44:27 -07:00
committed by GitHub
parent 36a5cd505a
commit 14482784db
3 changed files with 5 additions and 5 deletions
@@ -21,7 +21,7 @@ import Foundation
extension ImageStore {
/// A ReferenceManager handles the mappings between an image's
/// reference and the underlying descriptor inside of a content store.
internal actor ReferenceManager: Sendable {
internal actor ReferenceManager {
private let path: URL
private typealias State = [String: Descriptor]
+1 -1
View File
@@ -17,7 +17,7 @@
import Foundation
import Logging
actor TimeSyncer: Sendable {
actor TimeSyncer {
private var task: Task<Void, Never>?
private var context: Vminitd?
private let logger: Logger?
+3 -3
View File
@@ -18,9 +18,9 @@ import Foundation
extension OSFile {
struct SpliceFile: Sendable {
var file: OSFile
var offset: Int
let pipe = Pipe()
fileprivate var file: OSFile
fileprivate var offset: Int
fileprivate let pipe = Pipe()
var fileDescriptor: Int32 {
file.fileDescriptor