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

Feature request: Simple-threaded mode. #29

Open
vi opened this issue May 31, 2018 · 1 comment
Open

Feature request: Simple-threaded mode. #29

vi opened this issue May 31, 2018 · 1 comment

Comments

@vi
Copy link

vi commented May 31, 2018

Maybe one can opt-out threading, but gain ability to have !Send + !Sync filesystems?

It can be a Cargo feature or some...

Workaround: set threads to 1 and unsafe impl Send MyFs {} unsafe impl Sync for MyFs.

@Moliholy
Copy link

Moliholy commented Sep 8, 2019

I think it's a good suggestion. In my case the file system is implemented using sqlite3, which does not allow multiple threads and gives a compile-time error for not implementing Sync. My workaround was to manually implement Sync in the top-level struct and place a big fat warning saying it shouldn't be accessed concurrently, but a cleaner solution would be preferred.

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