diff --git a/SourceryRuntime/Sources/Common/Array+Parallel.swift b/SourceryRuntime/Sources/Common/Array+Parallel.swift index 02bc31208..a7183bc09 100644 --- a/SourceryRuntime/Sources/Common/Array+Parallel.swift +++ b/SourceryRuntime/Sources/Common/Array+Parallel.swift @@ -17,6 +17,7 @@ public extension Array { func parallelMap(transform: (Element) -> T) -> [T] { var result = ContiguousArray(repeating: nil, count: count) return result.withUnsafeMutableBufferPointer { buffer in + nonisolated(unsafe) let buffer = buffer DispatchQueue.concurrentPerform(iterations: buffer.count) { idx in buffer[idx] = transform(self[idx]) }