Multithreading - lwoggardner/rfuse GitHub Wiki

Just some notes I want I've learned about attempting to use multi-threaded FUSE

The loop_mt function in FUSE is not useful to ruby

We can release the Global VM Lock (GVL) prior to calling this loop but then FUSE would be trying to execute callbacks from its own threads, not created by Ruby, so there would be no way to reacquire the GVL prior to executing the Ruby callbacks

The next thing to try

Implement a main loop in ruby that calls IO.select on the FUSE file descriptor and reads a command and then pass that command to a new Ruby thread for execution