-
Notifications
You must be signed in to change notification settings - Fork 87
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
jnr-fuse and mutithreading? #24
Comments
Hi, @omllobet!
Yes, it is possible. No, there are no limitations. jnr-fuse is a direct wrapper around fuse that directly calls fuse methods. That also implies that your filesystem implementation has to be thread-safe. |
Hi @SerCeMan Thanks |
Hi, @omllobet! You can think of it as "I don't know the thread that every single fuse method will be called on and I'll have to synchronise access to all shared state.". MemoryFS is an example of a thread-safe FS. Although it is not non-blocking, it uses |
Hi @SerCeMan Thanks for the information, it is a read only filesystem and not very complicated, so it should be doable. It is enough to have multithreading in the filesystem just by making it threadsafe? The calling part is where my mind has more problems. But if I understand correctly If I do 2 copy operations on the mounted filesystem each one will go to the same thread in java or not? something like cp program-> c library -> system call -> kernel -> (fuse ) -> libfuse ->java program. Do I have to create the threads in java to be able to manage various call (like in a rest program where there are some threads waiting for incoming connections) or a thread is created by libfuse for each operation? Thanks again! |
You don't have to create threads manually. Given that Java thread is a wrapper around a native thread, you'll be operating on a thread created by |
Great, thanks for the information. |
Hi SerCeman,
We see that when we open a new file operation in a mounted directory like copying two files, the amount of bandwidth is divided between the two operations. My understanding is that it is because of the jnr-fuse and that the libfuse library supports multithreading.
So is it possible to implement multithreading using jnr-fuse? Are there any limitations in jnr preventing that?
Thanks for any comments you make about the topic.
The text was updated successfully, but these errors were encountered: