Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayBuilder is not Send #225

Closed
Tracked by #238 ...
gz opened this issue Aug 31, 2024 · 4 comments
Closed
Tracked by #238 ...

ArrayBuilder is not Send #225

gz opened this issue Aug 31, 2024 · 4 comments

Comments

@gz
Copy link
Contributor

gz commented Aug 31, 2024

I'm getting

190 |             let mut insert_builder = Arc::new(ArrayBuilder::new(sas).expect("can build array"));
    |                 ------------------ has type `Arc<serde_arrow::ArrayBuilder>` which is not `Send`

if I try to use ArrayBuilder in async functions (which often have the Send constraint for the things in the closure). I think the problem is the raw pointer here:

https://github.com/chmp/serde_arrow/blob/eb8d37a5bdab748251aa983cb1c1517047f28702/serde_arrow/src/internal/serialization/struct_builder.rs#L23C1-L23C55

Maybe it could be rewritten to not use raw pointers. Or be declared as Send if the raw pointer isn't used in a way that breaks Send guarantees (from a quick glance I don't think it is).

@chmp
Copy link
Owner

chmp commented Aug 31, 2024

@gz Thanks for the report. You're right there is no reason for the structure to not be Send. I will fix this issue on the develop-0.12 branch.

@chmp chmp mentioned this issue Sep 1, 2024
10 tasks
@chmp
Copy link
Owner

chmp commented Sep 1, 2024

Fixed with #227. I will close this issue once I release 0.12. The refactoring of the error messages will take some time though

@gz
Copy link
Contributor Author

gz commented Sep 1, 2024

Awesome thanks for the quick turnaround!

@chmp
Copy link
Owner

chmp commented Sep 30, 2024

Released with with 0.12.0

@chmp chmp closed this as completed Sep 30, 2024
@chmp chmp mentioned this issue Sep 30, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants