File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Sources/PostgresNIO/Connection Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,17 @@ public struct PostgresBinaryCopyFromWriter: ~Copyable {
130130 @inlinable
131131 public mutating func writeColumn( _ column: ( some PostgresEncodable ) ? ) throws {
132132 columns += 1
133- try underlying. pointee. writeColumn ( column)
133+ try invokeWriteColumn ( on: underlying, column)
134+ }
135+
136+ // Needed to work around https://github.com/swiftlang/swift/issues/83309, copying the implementation into
137+ // `writeColumn` causes an assertion failure when thread sanitizer is enabled.
138+ @inlinable
139+ func invokeWriteColumn(
140+ on writer: UnsafeMutablePointer < PostgresBinaryCopyFromWriter > ,
141+ _ column: ( some PostgresEncodable ) ?
142+ ) throws {
143+ try writer. pointee. writeColumn ( column)
134144 }
135145 }
136146
You can’t perform that action at this time.
0 commit comments