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 @@ -32,7 +32,17 @@ public struct PostgresBinaryCopyFromWriter: ~Copyable {
3232 @inlinable
3333 public mutating func writeColumn( _ column: ( some PostgresEncodable ) ? ) throws {
3434 columns += 1
35- try underlying. pointee. writeColumn ( column)
35+ try invokeWriteColumn ( on: underlying, column)
36+ }
37+
38+ // Needed to work around https://github.com/swiftlang/swift/issues/83309, copying the implementation into
39+ // `writeColumn` causes an assertion failure when thread sanitizer is enabled.
40+ @inlinable
41+ func invokeWriteColumn(
42+ on writer: UnsafeMutablePointer < PostgresBinaryCopyFromWriter > ,
43+ _ column: ( some PostgresEncodable ) ?
44+ ) throws {
45+ try writer. pointee. writeColumn ( column)
3646 }
3747 }
3848
You can’t perform that action at this time.
0 commit comments