projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.04k stars 95 forks source link

sync feature for ressource threading #252

Closed d34db4b3 closed 1 year ago

d34db4b3 commented 2 years ago

Hi, I think it could be interesting to allow using the elsa::sync::FrozenMap for ressource sharing between threads.

Let me known what you think.

zbraniecki commented 2 years ago

Thank you for the PR!

@Manishearth does that look reasonable to you?

Manishearth commented 2 years ago

It's typically not a good idea to swap out major internal implementation details via cargo features in ways that are externally visible or have perf implications, since cargo features are resolved globally.

It would be better to make it possible to use either backend, I think

d34db4b3 commented 2 years ago

I thought about this and I also think it would be better to be able to use either. I used the feature to avoid altering the current behavior of the crate. I can create a new pull request if you have any advise/opinion about how it should be done.

zbraniecki commented 2 years ago

Yes please, I agree with Manish. Let's get a fluent_resmgr::sync::* equivalents for sync use. You can macro it out to avoid duplications.

gregtatum commented 1 year ago

This PR is a little stale, and as I'm triaging and handling the pull request queue I'm going to go ahead and close it for now.