G
Greg Millam
This one's mostly for folks who know how ruby deals with threads inside
and out.
I have a little project, FuseFS, to provide a userland filesystem
entirely defined in Ruby. (Note: This is *not* rfuse, and is not a
direct implementation of the FUSE api. It is my intention to provide a somewhat
rubyish interface. That is: FuseFS is to FUSE as WEBrick is to the HTTP
protocol + TCPSocket.)
The use of FUSE has given me a few limitations:
* fuse_main literally takes over the program. So "FuseFS.run" basically
hands control of the app over to fuse. It does correctly call Ruby
methods. However, Threads() will not work, and this will likely
interfere with anybody who wants to write, say, a GMailFS clone or
anything using sockets.
* Without pthread support, FuseFS will be unable to deal with concurrent
calls. This also means it can't have anything that reads other files
in itself, and will hang indefinitely until kill -9'd.
What are my options, here? Can I have Ruby stand in its "own" thread,
and when a fuse thread gets an event, have it feed to the ruby thread,
then feed back? (Kinda polling-ish) ? etc?
Any ideas and opinions appreciated.
Thanks,
- Greg Millam
and out.
I have a little project, FuseFS, to provide a userland filesystem
entirely defined in Ruby. (Note: This is *not* rfuse, and is not a
direct implementation of the FUSE api. It is my intention to provide a somewhat
rubyish interface. That is: FuseFS is to FUSE as WEBrick is to the HTTP
protocol + TCPSocket.)
The use of FUSE has given me a few limitations:
* fuse_main literally takes over the program. So "FuseFS.run" basically
hands control of the app over to fuse. It does correctly call Ruby
methods. However, Threads() will not work, and this will likely
interfere with anybody who wants to write, say, a GMailFS clone or
anything using sockets.
* Without pthread support, FuseFS will be unable to deal with concurrent
calls. This also means it can't have anything that reads other files
in itself, and will hang indefinitely until kill -9'd.
What are my options, here? Can I have Ruby stand in its "own" thread,
and when a fuse thread gets an event, have it feed to the ruby thread,
then feed back? (Kinda polling-ish) ? etc?
Any ideas and opinions appreciated.
Thanks,
- Greg Millam