You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/12/18 22:47:21 UTC

[GitHub] [avro] Ten0 commented on a diff in pull request #1900: AVRO-3631: [Rust] Add support for (de)serializing Rust byte arrays to Avro values

Ten0 commented on code in PR #1900:
URL: https://github.com/apache/avro/pull/1900#discussion_r1051679417


##########
lang/rust/avro/src/ser.rs:
##########
@@ -17,9 +17,24 @@
 
 //! Logic for serde-compatible serialization.
 use crate::{types::Value, Error};
+use ref_thread_local::{ref_thread_local, RefThreadLocal};
 use serde::{ser, Serialize};
 use std::{collections::HashMap, iter::once};
 
+ref_thread_local! {
+    /// A thread local that is used to decide how to serialize
+    /// a byte array into Avro `types::Value`.
+    ///
+    /// Depends on the fact that serde's serialization process is single-threaded!

Review Comment:
   Ah I see why this isn't possible now ^^'
   
   Hmm I've added a comment at https://issues.apache.org/jira/browse/AVRO-3631 that suggests an alternate implementation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org