 public final class Rope {
 
     private(set) var conn: OpaquePointer!
+    private let connectionQueue: DispatchQueue = DispatchQueue(label: "com.rope.connection-queue-\(UUID().uuidString)")
 
     public var connected: Bool {
         guard let conn = conn, PQstatus(conn) == CONNECTION_OK else {

        return RopeError.connectionFailed(message: message)
    }
}

            tempValues.append(Array<UInt8>(s) + [0])
            values[idx] = UnsafePointer<Int8>(OpaquePointer(tempValues.last!))
        }
        let result = self.connectionQueue.sync {
            return PQexecParams(self.conn, statement, Int32(params.count), nil, values, nil, nil, Int32(0))
        }
        guard let res = result else {
            throw failWithError()
        }

